Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bryanWA
Frequent Visitor

Using conditional colour formatting across multiple visuals/

I have a series of visuals that display 6 metrics (each with its own measure) across the same time period which covers both historical actuals and the forward forecasts arranged on 1 tab in a 3 * 2 grid.  Each visual is a simple column graph each with a different measure as the y-axis and the same financial years as the x-axis.  I have different colours on each visual (just to show that they are reporting different measures).  

 

What I would like to do is use a single DAX measure to change the transparency of the historical years but leave the forecast years as a solid colour but with each visual having its own colour.  I have tried to use selectedmeasurename etc to pick up the measure that is on the y-axis so that I could use a SWITCH to set the colour and transparency, for the measure used in the visual but having no success.

 

I could write 6 seperate measures, but would prefer to have one for simplicity and consistency.  

 

Here is a snapshot of the page and the top right visual has a border to indicate the years I would like to make more transparent (which would be the same for all the visuals).  The actuals dates are flagged in my Date table so I will use that in the DAX to define which is an actual number and which is a forecast. 

 

bryanWA_0-1726552335108.png

Any help would be greatly appreciated.

 

2 REPLIES 2
amitchandak
Super User
Super User

@bryanWA , if they are values of columns and you are using small multiples, not a legend, then you can use conditional formatting using field value option and a measure

 

example

 

Measure =
Switch(true(),
max(Table[Column]) = "R1" , "Red" ,
max(Table[Column]) = "R2" , "Green" ,
max(Table[Column]) = "R3" , "Pink "
)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for the reply Amit.

 

I am using measures and not columns in the visuals, so the MAX DAX wont pick them up.  I did enjoy the video you had on hacking the colours on other visuals.  Very cool.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.