Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Zee
Partner - Contributor
Partner - Contributor

Bar Chart custom colors by set analysis value in Measures (Length of Bars)

I need to control the colors of bars in a bar chart to reflect the measure set analysis value. Any suggestions on how I do this?

This is the DATA for the Bar Chart:

Dimensions = Date

Measure 1
COUNT(DISTINCT {<Order_Status={'Recieved'}>} Order_Ref_No)

Measure 2
COUNT(DISTINCT {<Order_Status={'Ready to dispatch'}>} Order_Ref_No)

Measure 3
COUNT(DISTINCT {<Order_Status={'Delivered'}>} Order_Ref_No)

The code I would use to color by expression would be:

IF(Order_Status = 'Recieved', RED(),
IF(Order_Status = 'Ready to dispatch', YELLOW(),
IF(Order_Status = 'Delivered', GREEN(), BLUE()))

Thanks in advance!

 

1 Reply
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

You can put those Measures in Master Library (Master Measures) and give custom color to each measure (bar).

Check if that works for you.

Thanks,

Ashutosh