replace missing values by an expression of another attribute (another attribute divided by 0,17)
HSan1971
New Altair Community Member
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:
0
Best 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,
Roland1
Answers
-
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,
Roland1 -
Thanks a lot Roland for your help!0