Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings!
I have an issue with an nested IF in a bar chart color conditioning...
The rules are:
=< 10% - Green
Between 10 and 15% - Yellow
> 15% - Red
Pretty simple... but when I write it down the code:
IF(
(sum(if(Aging > 15, USD)) / sum(USD)) <= 10, RGB(100,255,0),
IF(
sum(if(Aging > 15, USD)) / sum(USD)) > 10, RGB(0,255,255),
IF(
sum(if(Aging > 15, USD)) / sum(USD)) <= 15, RGB(0,255,255),
IF(
sum(if(Aging > 15, USD)) / sum(USD)) > 15, RGB(255,0,0)
)
)
)
)
It just doesn't work... can anyone see the flaw in the nesting?
The QV debugger is not very helpful...
Thank you all in advance!
Corrected below
If((sum(if(Aging > 15, USD)) / sum(USD)) <= 10, RGB(100,255,0), IF(sum(if(Aging > 15, USD)) / sum(USD)) > 10, RGB(0,255,255), IF(sum(if(Aging > 15, USD)) / sum(USD)) <= 15, RGB(0,255,255), IF((sum(if(Aging > 15, USD)) / sum(USD)) > 15, RGB(255,0,0)) )
Corrected below
If((sum(if(Aging > 15, USD)) / sum(USD)) <= 10, RGB(100,255,0), IF(sum(if(Aging > 15, USD)) / sum(USD)) > 10, RGB(0,255,255), IF(sum(if(Aging > 15, USD)) / sum(USD)) <= 15, RGB(0,255,255), IF((sum(if(Aging > 15, USD)) / sum(USD)) > 15, RGB(255,0,0)) )
Thank you so much!
Hi,
maybe this may help you in the future:
http://www.qlikblog.at/464/tool-creating-nested-ifstatements/
Regards
Stefan