Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Hope that some one can help me with this. I can't seem to figure out what why this fails:
[TEST]:
Load
[Supplier Id],
[Invoice Year],
if( ScoreTotal >= $(vAScore) , 'A' , 'B') As [Test],
ScoreTotal as [Score - Total]
Resident [TEMP Total Score];
I keep getting this error:
Error in expression:
If takes 2-3 parameters
[TEST]:
Load
[Supplier Id],
[Invoice Year],
if( ScoreTotal >= 17,59495 , 'A' , 'B') As [Test],
ScoreTotal as [Score - Total]
Resident [TEMP Total Score]
Hope that there is a genius out there 😉
Thanks in advance
Yes, I think the problem ist the decimal separator of your vAScore variable.
Do you use a comma as decimal separator like
SET DecimalSep=',';
?
Try using $(#vAScore) instead in your if() statement.
Is there anyway you can add the .qvw document? Might be useful if we could have a play with it directly. I'm wondering if it's got to do with the "," in the variable. Have you tried puting the variable within single quotes? '$(vAScore)'
Cheers,
Emma
Yes, I think the problem ist the decimal separator of your vAScore variable.
Do you use a comma as decimal separator like
SET DecimalSep=',';
?
Try using $(#vAScore) instead in your if() statement.
Only 2 options
if( ScoreTotal >= $(vAScore) , 'A' , 'B') As [Test],
Or ScoreTotal is empty (not present in your table) or $(vAScore) is empty, could you put here the SET/LET command that created $(vAScore) ?
The problem was with the variable being formated as #,### insted of the script native #.### i solved it with:
if( ScoreTotal >= Num#($(vAScore)) , 'A' , 'B') As [Test],
Many thanks for your valuable input.