Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dltsonope
Partner - Contributor II
Partner - Contributor II

Qlik Sense - Advanced Conditional Color Expression

I need help with an expression for a pie chart.

The chart computes the average based on dimension A however I want the overall color of the chart to be influenced by dimension B. I did some research on a few forums and set analysis and this what I have managed to build up so far, any help on this query will be highly appreciated


if(Avg(${<DimensionB>}Answer)>3.7,

rgb(0,128,0),

if(Avg(${<DimensionB>}Answer)<=3.7

AND Avg(${<DimensionB>}Answer)>3.35,

rgb(50,205,50),

if(Avg(${<DimensionB>}Answer)<=3.35

AND Avg(${<DimensionB>}Answer)>3.15,

rgb(255,165,0),

rgb(255,0,0))))

4 Replies
Ivan_Bozov
Luminary
Luminary

Hello! How about this:

IF(Avg({<Dimension={'B'}>}Answer)>3.7, RGB(0,128,0),

IF(Avg({<Dimension={'B'}>}Answer)>3.35, RGB(50,205,50),

IF(Avg({<Dimension={'B'}>}Answer)>3.15, RGB(255,165,0),

RGB(255,0,0))))

vizmind.eu
shraddha_g
Partner - Master III
Partner - Master III

Please share sample app

dltsonope
Partner - Contributor II
Partner - Contributor II
Author

Folks thanks for the posts managed to do a work around on the app to make it work

dltsonope
Partner - Contributor II
Partner - Contributor II
Author

Unfortunately I can't share the app for confidentiality purposes, hence why I shared the logic in terms of what I was trying to develop.