Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

joshpinfold
New Contributor III

Colouring a Bar Chart

I have a bar chart where the dimension is 'ENPS' (a number scale form 0-10) and two measures which count the number scores for this week and for last week;

     count(if(weekstart(today()-1)=weekstart(Feedback_Day_Start),ENPS)) for 'this week'

     count(if(weekstart(today()-8)=weekstart(Feedback_Day_Start),ENPS)) for 'last week'

Does anyone have an expression that would enable me to change the colours of the two bars.

I thought if(weekstart(today()-1)=weekstart(Feedback_Day_Start),rgb(10,174,255)) would colour the 'this week' bar and leave the other grey but it didnt work,

Thanks

1 Solution

Accepted Solutions
omarbensalem
Esteemed Contributor

Re: Colouring a Bar Chart

Create ur 2 measures as master measures; and there u can assign a color to each measure.

Capture.PNG

In ur chart, use the newly created master measure and they'll be colored the way u want them to be

3 Replies
MVP
MVP

Re: Colouring a Bar Chart

May be omarbensalem‌ can help here

omarbensalem
Esteemed Contributor

Re: Colouring a Bar Chart

Create ur 2 measures as master measures; and there u can assign a color to each measure.

Capture.PNG

In ur chart, use the newly created master measure and they'll be colored the way u want them to be

joshpinfold
New Contributor III

Re: Colouring a Bar Chart

Thank you both. This works well