Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I do conditional coloring based on the different category column?

 

I have 8 columns as you can see below.

6 of the columns (Gesamtbewertung, Qualität, Logistik, Einkauf und Vertrieb, Service, Umwelt) are representing different categories shown as “speed indicators”. Additionally the amount of the speed indicator is shown in numbers on an extra display.

Well, I would like to mark the numbers shown in the displays

 

GREEN if the amount is =>90

 

RED if the amount is < 90

 

Black if the amount = 0

 

The displays are based on the different categories (Gesamtbewertung, Qualität, Logistik, Einkauf und Vertrieb, Service, Umwelt). For each category one display.

 

The amount which is shown at the display representing the latest worth of this category.

 

We created two different formulas but it didn`t work.

 

if([Bottom(sum(bew_Logistik))]<=90,red(),if([Bottom(sum(bew_Logistik))]=0,blue(),green()))

 

 

if(Bottom(sum(bew_Service))<=90,rgb(255,0,0),rgb(0,255,0))

 

 

Really don’t know how to do this and need your help please. You also can answer in German if you can.

 

Thanks

 

 

 

7 Replies
Not applicable
Author

Hi,

Try this way

Go to the chart properties

Presentation tab, in  Text in chart, click on edit , below you will find 'font', click on it, then click on color  and

type you expression in calculated box of 'base color'.

Rgds,

Vidhya

marcus_sommer

Go with the suggestion from vidhyavadkap and leave the bottom() function out - they won't be needed.

- Marcus

Not applicable
Author

Hi Vidhya,

thanks for your suggestion, but it still don`t work.

May the problem is that the display is a chart as well, no free text function.

The strange thing is, the formula works. The number which is shown is correct, only the coloring don`t work.

-Timo

marcus_sommer

You need to do these adjustment within these digital-gauges and not within the tacho-gauges.

- Marcus

stabben23
Partner - Master
Partner - Master

>90 should be 0.9 if you are working With percent

Not applicable
Author

Hi Marcus, guys

firts of all thanks for your support

attached some screenshots, may it helps to understand my problem.

Tacho properties - formula.

Display properties - formula and presentation

Normally the amount of the Tacho "logistik" should be shown in red, because it fell below the 0.9.

Why it don`t recognize that the amount which is shown in the Display, is under 90 % ???

I have no ideas guys.

marcus_sommer

Hi Timo,

I would check within a textbox (should be the same like your gauge) the result of expressions like this:

sum(bew_Logistik)

bottom(sum(bew_Logistik)) // I think further you didn't need it

if(sum(bew_Logistik) <=0.9, 'true', 'false')

If this don't helped I think it's best you prepared a small example with a few inline-tables which demonstrate these issue.

- Marcus