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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Anonymous
Not applicable

Format Columns in Matrix based on color

Hi All, In the below matrix Would like to show 01.Actual (value1,valu2) in orange , 02.Budget (Value1,Value2) in green color, 03.Forecast(Value1,Value2) in Blue color, like how i mentioned below Please help. Thanks.pbi1.jpg

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a color measure like the one given below and use that in matrix in conditional formatting -> Advance option -> Field Value

 

Switch( Max(Table[Type]),
"01.Actual" , "orange",
"02.Budget" , "green",
"03.Forecast" , "blue",
"White"
)

 

You can refer to my video for steps: https://www.youtube.com/watch?v=RqBb5eBf_I4

 

or refer

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

 

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

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Anonymous,

In fact, the conditional formatting feature allows you to use other field values for formatting.

For your requirement, you can write measure expressions to extract the current category value for color formatting.

Using the SELECTEDVALUE function in DAX - SQLBI

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , Create a color measure like the one given below and use that in matrix in conditional formatting -> Advance option -> Field Value

 

Switch( Max(Table[Type]),
"01.Actual" , "orange",
"02.Budget" , "green",
"03.Forecast" , "blue",
"White"
)

 

You can refer to my video for steps: https://www.youtube.com/watch?v=RqBb5eBf_I4

 

or refer

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

 

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.