Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am getting an error for the below code: Error in Expression, If takes 2-3 parameters.
if(Age>92,(Value * Age)/'365',Value))As New_Value
I am checking the same. The script now is showing no error and got executed. Now as sanshupop has mentioned above, i have to check if the logic of the expression is working correctly or not. Sure will keep you updated.
Hello,
Just by looking at it there are to many right-side brackets. However, since your title mentions nested if-statements, there might be another if-statement? If so, then it would be best to show that statement aswell.
Regards
if(isnull([Start Date])=-1 or isnull([End Date])=-1 or Age<=92,Value,
if([Start Date]>[End Date],'99999'),
if(Age>92,(Value * Age)/'365',Value))As New_Value
Seems to be a mixup with the brackets.
The right way should be:
if(isnull([Start Date])=-1 or isnull([End Date])=-1 or Age<=92,Value,
if([Start Date]>[End Date],'99999',
if(Age>92,(Value * Age)/'365',Value))) As New_Value
try this
if(isnull([Start Date])=-1 or isnull([End Date])=-1 or Age<=92,Value,
if([Start Date]>[End Date],99999),
if(Age>92,(Value * Age)/365,Value))As New_Value
hope this helps
thank you
I dont think that will work. The if-statements need to be nested, that is the next if-statements need to be inside one of the logical consequences of the previous statement.
Ex:
if(condition, then , if(condition, then))
not
if(condition, then),if(condition,then) since qlikview will see the two statement as seperated and the whole expression will be seen as illogical.
mark it correct so that we can understand that issue is closed .
I am checking the same. The script now is showing no error and got executed. Now as sanshupop has mentioned above, i have to check if the logic of the expression is working correctly or not. Sure will keep you updated.
Logic is working correctly with the same corrected expression. Thanks for the help...