Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Partner
Partner

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
Luminary
Luminary

Re: Qlik Sense - Advanced Conditional Color Expression

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))))

Partner
Partner

Re: Qlik Sense - Advanced Conditional Color Expression

Please share sample app

Highlighted
Partner
Partner

Re: Qlik Sense - Advanced Conditional Color Expression

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

Partner
Partner

Re: Qlik Sense - Advanced Conditional Color Expression

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.