Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
In KPI, I want to colour code the text and an Arrow symbol based On if condition.
If(count({<Month = {'current month'}>}ID) >=count({<Month = {'Previous month'}>}ID),
Count(id) & '⬆️', count(id) & '⬇️')
here if id count is greater than or equal to previous month count, It should reflect as COUNT NUMBER IN GREEN & EVEN THE SYMBOL TO BE SHOWN AS GREEN
ELSE IN NUMBER IN RED & ARROW POINTING DOWN IN RED.
Can anyone help me on this.
Hi,
as in KPI, you only can 'color' numerical values, so you need to convert your expression to it using dual() function. So it could look like this:
if(count({<Month = {'current month'}>}id) >=count({<Month = {'Previous month'}>}id), dual(Count(id) & '▲', 1), dual(count(id) & '▼', -1))
(and set expressions Number formatting to 'Measure expression'). Basically, with dual you just show you count(id) and arrow, but numerical value of this will be 1 and minus 1 (true/false).
Now in tab Appearance -> Color, turn on Conditional colors and Add Limit, set it to 0, and colors for negative and positive values:
Other solution could be to still use dual() function in expression, but remove arrow symbols: ...dual(count(id), 1), dual(count(id), -1))
and add arrows or other symbols for true/false in Value selection step:
Hi,
as in KPI, you only can 'color' numerical values, so you need to convert your expression to it using dual() function. So it could look like this:
if(count({<Month = {'current month'}>}id) >=count({<Month = {'Previous month'}>}id), dual(Count(id) & '▲', 1), dual(count(id) & '▼', -1))
(and set expressions Number formatting to 'Measure expression'). Basically, with dual you just show you count(id) and arrow, but numerical value of this will be 1 and minus 1 (true/false).
Now in tab Appearance -> Color, turn on Conditional colors and Add Limit, set it to 0, and colors for negative and positive values:
Other solution could be to still use dual() function in expression, but remove arrow symbols: ...dual(count(id), 1), dual(count(id), -1))
and add arrows or other symbols for true/false in Value selection step: