Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

svskumar
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
Not applicable

Re: Expression for custom color for measures

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

Can you share an image of your bar chart please?

svskumar
Not applicable

Re: Expression for custom color for measures

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

rahulpawarb
Not applicable

Re: Expression for custom color for measures

Hello Venkat,

May be try below link:

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

Regards!

Rahul

svskumar
Not applicable

Re: Expression for custom color for measures

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
Not applicable

Re: Expression for custom color for measures

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

svskumar
Not applicable

Re: Expression for custom color for measures

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
Not applicable

Re: Expression for custom color for measures

Hi Venkat,

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

Regards

Sathish

omarbensalem
Not applicable

Re: Expression for custom color for measures

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.

svskumar
Not applicable

Re: Expression for custom color for measures

Omar,

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

Regards,

Sateesh