Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I make the below if statement work?
if([Performance] = 9 OR IF([Performance] = 10 AND IF([Total # ] = 4 OR IF([Total # ] = 5,'0%',
if([Performance] = 9 OR IF([Performance] = 10 AND IF([Total #] = 2 OR IF([Total # ] = 3,'0%',
if([Performance] = 9 OR IF([Performance] = 10 AND IF([Total # ] = 0 OR IF([Total # ] = 1,'-3%',
if([Performance] = 6 OR IF([Performance] = 7 OR [Performance] = 8 AND IF([Total # ] = 4 OR IF([Total # ] = 5,'0%',
if([Performance] = 6 OR IF([Performance] = 7 OR [Performance] = 8 AND IF([Total # ] = 2 OR IF([Total # ] = 3,'0%',
if([Performance] = 6 OR IF([Performance] = 7 OR [Performance] = 8 AND IF([Total # ] = 0 OR IF([Total # ] = 1,'-5%',
This is a literal correction of your expression:
If(([Performance] = 9 OR [Performance] = 10) AND ([Total # ] = 4 OR [Total # ] = 5), '0%',
If(([Performance] = 9 OR [Performance] = 10) AND ([Total #] = 2 OR [Total # ] = 3), '0%',
If(([Performance] = 9 OR [Performance] = 10) AND ([Total # ] = 0 OR [Total # ] = 1),'-3%',
If(([Performance] = 6 OR [Performance] = 7 OR [Performance] = 😎 AND ([Total # ] = 4 OR [Total # ] = 5), '0%',
If(([Performance] = 6 OR [Performance] = 7 OR [Performance] = 😎 AND ([Total # ] = 2 OR [Total # ] = 3), '0%',
If(([Performance] = 6 OR [Performance] = 7 OR [Performance] = 😎 AND ([Total # ] = 0 OR [Total # ] = 1), '-5%'))))))
Hi,
Try <> for in place of OR
I have no idea what exactly are you trying to do. May be put this whole if statement in words and may be we can help?
I guess this is not a qlikview expression. Don't try to converting the formula. First understand the requirement and in put data and write the expression on Qlikview way. I guess you don't need to many if here.
This is a literal correction of your expression:
If(([Performance] = 9 OR [Performance] = 10) AND ([Total # ] = 4 OR [Total # ] = 5), '0%',
If(([Performance] = 9 OR [Performance] = 10) AND ([Total #] = 2 OR [Total # ] = 3), '0%',
If(([Performance] = 9 OR [Performance] = 10) AND ([Total # ] = 0 OR [Total # ] = 1),'-3%',
If(([Performance] = 6 OR [Performance] = 7 OR [Performance] = 😎 AND ([Total # ] = 4 OR [Total # ] = 5), '0%',
If(([Performance] = 6 OR [Performance] = 7 OR [Performance] = 😎 AND ([Total # ] = 2 OR [Total # ] = 3), '0%',
If(([Performance] = 6 OR [Performance] = 7 OR [Performance] = 😎 AND ([Total # ] = 0 OR [Total # ] = 1), '-5%'))))))
But that is very clumsy. The equivalent simplified expression would be
If(Match([Performance], 9 , 10) AND Match([Total # ], 0, 1), '-3%',
If(Match([Performance], 6, 7, 😎 AND Match([Total # ], 0, 1), '-5%',
'0%'))
Hi Pavana
My guess is there's missing parenthesis in your expression. The only way to adjust is understanding the business rules
above is the legend and based on that I have the if condition.I have this in the text box and also I have to have the rgb set.
Ex : if Score is 9 or 10 and Total# is 4 or 5 then 0%,rgb(green())
if Score is 9 or 10 and Total# is 2 or 3 then 0%,rgb(green())
if Score is 9 or 10 and Total# is 0 or 1 then -3%,rbg(yellow())
same thing for Score 6,7,8.
Thank you very much for your help.
Thank you.
This is not working for me nor the other one.When I add the AND it doesnt work.
May be like this:
If(Match(Score, 9, 10),
If(Match([Total#], 0, 1), '-3%', '0%'),
If(Match(Score, 6, 7, 8),
If(Match([Total#], 0, 1), '-5%', '0%')))
If(Match(Score, 9, 10),
If(Match([Total#], 0, 1), Yellow(), Green()),
If(Match(Score, 6, 7, 8),
If(Match([Total#], 0, 1), Red(), Green())))