Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
I have this IF clause:
if([CostCenter]<>'2450', -Sum(amount) / 1000, if([CostCenter]='2450' and
match(Counter, 'Music ' ,'TV'), -sum(amount) / 1000), sum(amount) / 1000)))
Syntax error says: IF takes 2-3 parameters.
But due to the help.qlik it should work?
This clause is not in the loading script. It is in the App on a measure.
Any ideas?
Thanks, Tom
I found the cause of this error:
if([CostCenter]<>'2450', -Sum(amount) / 1000, if([CostCenter]='2450' and
match(Counter, 'Music ' ,'TV'), -sum(amount) / 1000), sum(amount) / 1000)))
Correct:
if([CostCenter]<>'2450', -Sum(amount) / 1000, if([CostCenter]='2450' and
match(Counter, 'Music ' ,'TV'), -sum(amount) / 1000, sum(amount) / 1000)))
Now it says, garbarge after expression: ')'....
Any ideas?
Hello,
try this:
if([CostCenter]<>'2450', -Sum(amount) / 1000,
if([CostCenter]='2450' and match(Counter, 'Music ' ,'TV')>0,
-sum(amount) / 1000
),
sum(amount) / 1000
)
The second if does not return an exception. In case you need it, switch the brackets:
if([CostCenter]<>'2450', -Sum(amount) / 1000,
if([CostCenter]='2450' and match(Counter, 'Music ' ,'TV')>0,
-sum(amount) / 1000, sum(amount) / 1000
)
)