Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

issue in applying customized color to bargraph through color expression

Hi,

i am trying to apply customized color throught color expression

Dimenion1:match(question_id,'Q1','Q2')

Diemnsion 2 : if((Match(answer_text,'Strongly Agree','Excellent')),'Strongly Agree',if(Match(answer_text,'Agree','Above Average'),'Agree'))

Expression: count(distinct{<question_id={'Q1','Q2'}>} lender_offer_id)/count(distinct {<question_id={'Q1','Q2'}>} total lender_offer_id)

color expression:

If(question_id = 'Q1', if(answer_text = 'Strongly Agree', lightblue(),LightMagenta()),

If(question_id = 'Q2', if(answer_text = 'Strongly Agree',  LightGreen(),LightRed())))

Here everything looks good to me. But i am not able to chage color of Strongly Agree option of Q1. It remains whole color with megenta.

Captureimg.PNG

Please help me on this.

Tags (2)
3 Replies
micheledenardi
Valued Contributor

Re: issue in applying customized color to bargraph through color expression

The problem is how you are aggregating your data in the 2nd dimension.

Using if((Match(answer_text,'Strongly Agree','Excellent')),'Strongly Agree',if(Match(answer_text,'Agree','Above Average'),'Agree')) you are wrongly grouping your data.

Try to use simply "answer_text" as your second dimension.

berryandcherry6
Contributor II

Re: issue in applying customized color to bargraph through color expression

Hi,

Thanks for reply

If i do so, how to group Strongly Agree','Excellent' as 'Strongly Agree' and

'Agree','Above Average' as 'Agree'.  Please find attached qvf file.

micheledenardi
Valued Contributor

Re: issue in applying customized color to bargraph through color expression

Just do it via script to obtain:

2017-05-25 10_10_44-Qlik Sense Desktop.png

Community Browser