Forum Discussion
Conditional color coding in Bar chart
- Anonymous4 years ago
Hi Kavya123
This issue should be caused by Max function in color measure, it will always catch the max Company ID in same Desc. So when you have 100 and 200 in AAA(Desc) in 1(ID), only click 200 will show red. Try values function to get Company ID in Data Table. The new measure is as below.
Color Measure 1 = VAR _SELECTCompanyID = SELECTEDVALUE('Company ID'[Company ID]) VAR _VALUES= VALUES('New Table'[Company ID]) RETURN IF(_SELECTCompanyID IN _VALUES,"Red","Yellow")Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Kavya123 Are you slicers and bar chart columns all coming from the same table? If so then do you have interactions turned off between the slicers and the bar chart?
Hi,
Thanks for your response. Yes slicers and bar chart columns all coming from the same table.
This is the sample data.
Company ID , ID, Desc
100,1,AAA
200,1,BBB
300,1,CCC
400,1,DDD
100,2,EEE
200,2,FFF
300,2,GGG