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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

color in total is not coming

hello,

Please find attached qvw.

There is no color in total. color rules for total is same as other rows.

Can you help me in this,

Thanks

Amit

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

Change your color expression to (for the total there are more ScheduleHealth values then one, so you need an aggregation function)

if(Avg(ScheduleHealth/100)<.49,RGB(250,0,0),

if(Avg(ScheduleHealth/100)>.49 and Avg(ScheduleHealth/100)<=.85,RGB(250,150,0),

if(Avg(ScheduleHealth/100)>=.85,RGB(0,150,0),

if(Avg(ScheduleHealth/100)=.50,RGB(250,150,0),

null()))))

View solution in original post

5 Replies
stigchel
Partner - Master
Partner - Master

Change your color expression to (for the total there are more ScheduleHealth values then one, so you need an aggregation function)

if(Avg(ScheduleHealth/100)<.49,RGB(250,0,0),

if(Avg(ScheduleHealth/100)>.49 and Avg(ScheduleHealth/100)<=.85,RGB(250,150,0),

if(Avg(ScheduleHealth/100)>=.85,RGB(0,150,0),

if(Avg(ScheduleHealth/100)=.50,RGB(250,150,0),

null()))))

Not applicable
Author

Hi,

Thanks. cant I use label in background expression?

stigchel
Partner - Master
Partner - Master

It seems that the reference to the expression label takes the Expression total, which has no result for a non-aggregated expression. So not the average of rows, which you configured as total mode for this expression.

Also, I hope you realize that your expression shows no result for your dimension UID's where there are multiple ScheduleHealth values. Should this be a mistake use

Avg(ScheduleHealth/100)

Instead. Then the reference in background color to the expression label also works for the total

Not applicable
Author

Hi,

can I send u mail regarding this?

stigchel
Partner - Master
Partner - Master

I'm sorry, but I would like to keep the conversation in the community where others can contribute as well.