Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
prae01
Partner - Contributor
Partner - Contributor

Conditional color on KPI chart does not fully work

I want the KPI chart to fully reflect such that for instance, 2014 Net Sales are displayed. Under conditional coloring, if Net sales 2014 > Net sales 2013, it turns red, else it turns green.

 

While it is red (which is supposedly correct), I tested with multiplying the value into 2, which should already be green, but it still appears red. It is red until I multiply into 2.95, and after that number it is green. It is wrong as the value 2014>2013 already before it is multiplied into 2 (refer to table screenshot) .I tried moving around the scaling, changing expressions from greater to and lesser than (> and <) , to getting the difference which got me the closest, but still not accurate.

 

I would appreciate a foolproof way to get a fully accurate result. Attaching screenshots for context and a table for context on why it is wrong. 

prae01_0-1740702856314.pngprae01_1-1740702890739.png

prae01_2-1740703046969.png

 

 

Thanks a lot for the help

Labels (4)
2 Replies
henrikalmen
Specialist II
Specialist II

Could you please show the conditional coloring settings as well?

JandreKillianRIC
Partner Ambassador
Partner Ambassador

Hi @prae01 

I must mention that I also struggled a bit with this one... 

Firstly I would make the Set Analysis more dynamic. 

First Measure 

Sum({<Year = {"$(=Max(Year))"}>} Sales)

with Label expression 

='Sales '&Max(Year)

Second Measure 

Sum({<Year = {"$(=Max(Year)-1)"}>} Sales)

with Label Expression 

='Sales '&Max(Year)-1

 

For the colors 

JandreKillianRIC_0-1740726642753.png

 

The expression would just be 

=Sum({<Year = {"$(=Max(Year)-1)"}>} Sales)

This would work and by nice and dynamic 

Regards Jandre

 

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn