Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

joshi_qlikview
Contributor

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

8 Replies
omarbensalem
Esteemed Contributor

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

maybe color as expression :

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

?

joshi_qlikview
Contributor

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

edmondo_tassi
New Contributor III

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

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

edmondo_tassi
New Contributor III

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

Excuse me I have click reply in the wrong place.

Try this.

sujith1011
Contributor

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

etrotter
Contributor II

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 ()

)))

joshi_qlikview
Contributor

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

Hi ,

Thanks for your time.

i want this in Qlik sense

Thanks

shraddha_g
Honored Contributor III

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