Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
using a button to show a numerical KPI.
I want colour to change according to an expression.
Trying different option, but none although syntax correct, do not show correct colour.
Any ideas?
These are the expression I am trying:
if([apsys_item_id] = 'EP06' and [apsys_score] < 1, 'red',
if([apsys_item_id] = 'EP06' and [apsys_score] < 2, 'orange',
if([apsys_item_id] = 'EP06' and [apsys_score] < 3, 'yellow',
if([apsys_item_id] = 'EP06' and [apsys_score] >= 3, 'green', 'white')
)
)
)
Or you can use color function: https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/ColorFunc...
Like:
if([apsys_item_id] = 'EP06' and [apsys_score] < 1, red(),
if([apsys_item_id] = 'EP06' and [apsys_score] < 2, lightred(),
if([apsys_item_id] = 'EP06' and [apsys_score] < 3, yellow(),
if([apsys_item_id] = 'EP06' and [apsys_score] >= 3, green(), white())
)
)
)
the syntacs of the formula is correct. the only thing you need to do is change the red, orange, yellow, etc. to there hex colors
for example change 'red' --> '#FF0000' and do this for all colors and it will work
Or you can use color function: https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/ColorFunc...
Like:
if([apsys_item_id] = 'EP06' and [apsys_score] < 1, red(),
if([apsys_item_id] = 'EP06' and [apsys_score] < 2, lightred(),
if([apsys_item_id] = 'EP06' and [apsys_score] < 3, yellow(),
if([apsys_item_id] = 'EP06' and [apsys_score] >= 3, green(), white())
)
)
)