Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to apply a condition for color in KPI object. I have 3 fields, I would like to show field "A" with color based on fields B & C.
If B>C then A should appear in red, otherwise in green.
Can someone help me achieve this?
I use QlikSense 2.2.4
Hi,
Try like below in your field A background color properties,
your field A
=if(sum(Measure2)>sum(Measure3),Red(),Green())
refer sample app.
Use below expression in
Hi Devarasu,
I need this conditional color for KPI Object, not for a table.
Hi,
Can you share your app. tks
Add 2 Limits with expression of Measure2 and Measure 3 and then select colors there.
Hi, I am afraid we cannot achieve this directly. As a workaround, i think we can do the following.
1. first go to color settings in KPI Object. In QS 3.2, it is there under Appearance.
2. Enable the conditional color option.
3. Enter the expression in this format.
If(exp1>exp2, 0.75,0.25)
4. Arrange the limit scroll bar at the center if you want to use only two colors. Or add add more limits.
5. Choose the color from the list by click the on the bar.
P.S: You can select color from the list only.
Hi,
Instead of writing an IF condition, try this method: set the variable to your target variable.
For example: IF([Revenue - YTD] > [Last Yr Revenue], RGB(0,0,0), RGB(0,0,0))
In the IF condition, we are using [Last Yr Revenue] as the target value.
So, instead of writing the IF condition as an expression, set the measure value to =[Last Yr Revenue]
You can see from the results, when the current year revenue is higher than last year the colour is Green and when it's lower, the colour is Red
hope this will help you.