replace missing values by an expression of another attribute (another attribute divided by 0,17)

HSan1971
HSan1971 New Altair Community Member
edited November 2024 in Community Q&A
Hi everyone, I need to replace missing values in some attribute by an expression of another attribute. for instance: in attribute "total day minutes" I need to replace the missing values by "total day charge" divided by 0,17 
Tagged:

Best Answer

  • RolandJones
    RolandJones
    Altair Employee
    Answer ✓
    Hi @HSan1971,

    Simplest here is probably to use Generate Attributes. You can overwrite columns, so you would declare a column called "total day minutes", and the function would be:

    if(missing([total day minutes]),[total day charge]/0.17,[total day minutes])

    The if statement is used alongside the missing function to run the function if there's a missing value, else you state it should keep it's value.

    Hope this works for you.

    Best,

    Roland

Answers

  • RolandJones
    RolandJones
    Altair Employee
    Answer ✓
    Hi @HSan1971,

    Simplest here is probably to use Generate Attributes. You can overwrite columns, so you would declare a column called "total day minutes", and the function would be:

    if(missing([total day minutes]),[total day charge]/0.17,[total day minutes])

    The if statement is used alongside the missing function to run the function if there's a missing value, else you state it should keep it's value.

    Hope this works for you.

    Best,

    Roland
  • HSan1971
    HSan1971 New Altair Community Member
    Thanks a lot Roland for your help!

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.