Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator II
Creator 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.

3 Replies
micheledenardi
Specialist II
Specialist II

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.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
berryandcherry6
Creator II
Creator II
Author

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
Specialist II
Specialist II

Just do it via script to obtain:

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

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.