Forum Discussion
Conditional color coding in Bar chart
- Anonymous5 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.
Company ID , ID, Desc
100,1,AAA
200,1,AAA
300,1,DDD
400,1,DDD
100,2,EEE
200,2,FFF
300,2,GGG
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 Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.