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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.