Forum Discussion
Dynamically changing colors in Bar chart
- 7 years ago
Try modifying the measure as
Measure 2 = IF ( VALUES ( Table2[Text value] ) IN VALUES ( Table1[Text ] ), "#6c1610" )
Hi Zubair Muhammad,
Thanks for ther reply. It is working for single text value. For company B there are two texts. If i select company B (Direct assistance,Management testing) both bars should highlight.
- Zubair_Muhammad7 years agoCommunity Champion
Try modifying the measure as
Measure 2 = IF ( VALUES ( Table2[Text value] ) IN VALUES ( Table1[Text ] ), "#6c1610" )
- Kavya1237 years agoHelper III
Thanks a lot it worked.
- Kavya1237 years agoHelper III
Is it possible to format colors both by rules and field value together. The matched text bar should highlight the color based on the rules.
For example if we select gold color, the matched text bar should highlight in red color and remaining bars should be gold colors.
- Zubair_Muhammad7 years agoCommunity Champion
Sorry for late reply.
See if the attached file helps
You can create a small table defining colors and hex codes.
You can get codes from
https://www.w3schools.com/colors/colors_picker.asp
Now you can modify the MEASURE AS
Measure 2 = IF ( VALUES ( Table2[Text value] ) IN VALUES ( Table1[Text ] ), MIN ( Colors[HexCode] ) )
- n00b_907 years agoFrequent Visitor
Sorry for hijacking the thread, but how do i make the highlight function work when all the values (text and measure) are in the sambe table?