Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Jwillmann
Contributor III
Contributor III

Change color formula in chart depending on selected measure.

Hello Qlik Community,

Sorry in advance my Qlik is in german so i might not get every element by the correct english name.

 

I have a barchart where i use alternative measures to switch between sales, calls, and visits.

For every measure i have another one with how high the value should be.

I figured Out that the Formula for the color of one Element should look like this:

if( Sum([Sales]) < Sum([Sales should]),'red','green').

 

Now i need a way to combine 3 ifs to check for the measure, i suspect it has to do something with Getobjectmeasure, but can't make it work.

 

Thank you for your help.

1 Solution

Accepted Solutions
Jwillmann
Contributor III
Contributor III
Author

I figured a way out, 

if anyone lands here my solution is:

if(GetObjectMeasure()='Besuche', if( Sum([Besuche Ist]) < Sum([Besuche Soll]),'red','green'),
if(GetObjectMeasure()='Umsatz', if( Sum([Umsatz]) < Sum([Forecast]),'red','green'),
if(GetObjectMeasure()='Anrufe', if( Sum([Anrufe Ist]) < Sum([Anrufe Soll]),'red','green'))))

View solution in original post

1 Reply
Jwillmann
Contributor III
Contributor III
Author

I figured a way out, 

if anyone lands here my solution is:

if(GetObjectMeasure()='Besuche', if( Sum([Besuche Ist]) < Sum([Besuche Soll]),'red','green'),
if(GetObjectMeasure()='Umsatz', if( Sum([Umsatz]) < Sum([Forecast]),'red','green'),
if(GetObjectMeasure()='Anrufe', if( Sum([Anrufe Ist]) < Sum([Anrufe Soll]),'red','green'))))