8 Replies Latest reply: Sep 8, 2017 1:35 AM by Shraddha Gajare

# Qlik sense bar chart color based on the Margin %

0Hi Guru's,

i have

Dimensions:Q1,Q2,Q3,Q4

Measure:Margin%

Now i want to show if (Margin%)<90% ,Blue color till 90,after 90 to 100 other color ,similary 4 Colors in Single bar .

How to achieve this.any help would be greatly appreciated.

Plz find the attached report screen.

Thanks,

raj

• ###### Re: Qlik sense bar chart color based on the Margin %

maybe color as expression :

if(yourMeasure<0.9, blue(), green())

?

• ###### Re: Qlik sense bar chart color based on the Margin %

Hi Omar,

Thanks for your time,i used same but if value for Q1 is 150, its >90 so till end bar showing single color.

i want till 90 one color ,90 to 100 one color .....

Thanks,

raj

• ###### Re: Qlik sense bar chart color based on the Margin %

I don't sure to understand. Can You try this?

• ###### Re: Qlik sense bar chart color based on the Margin %

Excuse me I have click reply in the wrong place.

Try this.

• ###### Re: Qlik sense bar chart color based on the Margin %

Hi ,

i want this in Qlik sense

Thanks

• ###### Re: Qlik sense bar chart color based on the Margin %

if (  Margin <= 90,BLUE(),

if (  Margin > 90 and Margin <= 100,Red(),

BLACK() )

)

You can add more if conditions within it

• ###### Re: Qlik sense bar chart color based on the Margin %

if you want it exactly the colors of the picture  you posted:

if (Margin <= 90, Blue(),

if(Margin > 90 and Margin <=95, lightGray(),

if (Margin >95 and Margin < 100, Yellow(), Green ()

)))

• ###### Re: Qlik sense bar chart color based on the Margin %

Create a Synthetic Dimension for <90, 90-100,>100

Modify your measure to show these Values

In color,

Use Pick(wildmatch(Valuelist('<90', '90-100','>100'),'<90', '90-100','>100'),

green(),

red(),

black()

)

Try this way.. It might help