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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.