Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Coloring

Hi guys,

I've been trying to do some searching for conditional expressions, but I haven't had any luck so far.

Right now I have two KPIs. One that shows Revenue from 2014 and one from 2015.

I did set analysis to filter the revenue by the year:

2014 Revenue Expression: Sum({$<Year={"FY14"}>}"Revenue")

2015 Revenue Expression: Sum({$<Year={"FY15"}>}"Revenue")


Now, I would like the 2015 Revenue to be a certain color depending on if it's higher or lower than 2014 Revenue (example: red if lower, green if higher).


I checked conditional coloring, but I'm a little confused as to how the expression should be formatted (most likely an if expression?).


Any help would be greatly appreciated. Thanks!

26 Replies
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

You don't need that to define. coz that will be taken care by upper bound Red color. Assuming that you are trying to color only 2015 KPI object.

Not applicable
Author

Where do you put the sliding bar below the red/green? It seems like yours doesn't even move...? But the segments are still defined by it.

Not applicable
Author

I still don't understand how 2015 Revenue can serve as a "max" if it is actually lower than 2014 Revenue? I just tried it, and the conditional coloring did not work.

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

Can you post your QVF if possible?

Not applicable
Author

I can't insert the qvf due to sensitive data, but here is a screenshot. I have followed your steps for Min/Max. For the slider, I tried putting the 2014 sales data, but that didn't seem to work (such as when I made 2015 smaller than 2014).

conditional.png

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

I see 2015 value being higher and will show in GREEN. if it lower than 2014 then it should show RED. am i missing something here.

you have 59.83M for 2014 which is lower than 62.76M for 2015. So 2015 will be Green. or else it will be red.

Not applicable
Author

Look at the circled part of the screenshot. The red/green will actually depend on that number. Not compared to 2014/2015.

I tried making that circled value as 2014's value. But it did not work.

Additionally, I tried making 2015 lower than 2014 and it did not change to red.

Not applicable
Author

Here is another screenshot if I simply just change the data for 2015 to make it smaller. For some reason the color did not change. I did not make any changes to Qlik.

conditional2.png

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

So you added as mentioned below correct?6-11-2015 3-22-33 PM.png

Not applicable
Author

Yes I did everything you said. When 2015 is higher than 2014, it works fine. The problem is that when 2015 is lower than 2014, it does not work (color doesn't change correctly).

Edit: Additionally, sometimes I am able to adjust it so the colors change correctly, but the glyphs do not. Seems kind of strange since the glyph should be associated with the colors?