Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression for custom color for measures

I am new to Qliksense, I created one Stacked Bar chart in the Qlik sense. I got requirement to use custom colors on measure. can you help me in the expression logic to get the color. Below is the expression I tried but by default it is considering else statement color.

If (Value = 'Yes',Green(),Red())

I have measure value with Yes and No values. I am displaying Count of Yes and No in the bar chart. I need color expression for this.

Thanks in advance.

Regards,

Sateesh

13 Replies
OmarBenSalem

How are you using your measure 'yes or no' in a bar chart?

Can you share an image of your bar chart please?

Anonymous
Not applicable
Author

I am using count of  'Yes' and Count of 'No' in bar chart which are available in measure "Value" and attaching screenshot below.

rahulpawarb
Specialist III
Specialist III

Hello Venkat,

May be try below link:

Qlik Sense: How to set custom colors by measure in a bar chart

Regards!

Rahul

Anonymous
Not applicable
Author

Hi Rahul,

       I have one dimension and one  measures which is consisting of Yes and No.  To count Yes in Value I am using one measure and for 'No' I am using another measure. So, I am not able to create colors like in the provided link.

Regards,

Sateesh

satheshreddy
Creator III
Creator III

Hi Venkat,

your using 2 exp like 1 is count(yes) and 2 count(no) so if you write if condition also no use because if(value=yes,green(),blue()) these exp no use how you show colors like that.

if you use if condition you can able to give range colors.

can you elaborate your query? 

Regards

Sathish

Anonymous
Not applicable
Author

My query is I have to show the color green for count of 'Yes'  and red color for count of 'No' in the bar graph.

satheshreddy
Creator III
Creator III

Hi Venkat,

then use grouped color there you can edit colors what ever you want.

Regards

Sathish

OmarBenSalem

Are you using Qlik Sense 3.2?

If so, you can create your 2 measures as master items and affect a color (green and red) to each measure, then use them in yur graphic.

Anonymous
Not applicable
Author

Omar,

   Can you help me how to create 2 measures as master items and affect colors to that.

Regards,

Sateesh