How to convert a value using if-then-else?
Hi,
I've created the following function to convert an input to zero if the input equals to null and to return the value if it is not null. However, the if-then-else step states that function must return True or False which is not the output required. Could you please have look into it and advise the way forward.
Many thanks in anticipation.
Best Answer
-
This might be useful:
0
Answers
-
Hi Marco
Is this Function a a rule within the Validate step? If so it is expecting the output to be True/False. In v2.7.6 we added the ability to Ignore values such as Nulls when using Validate https://community.experianaperture.io/discussion/836/aperture-data-studio-2-7-6
If it is a Transform that you are trying to achieve then I think you can simplify "convert an input to zero if the input equals to null and to return the value if it is not null" to a single function:
Your function does the first bit, checking null and returning zero, but returns true/false for the Else rather than the value. You have selected your Variable rather than 'Input' column.
Hope this helps
0