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
clem312
Resolver I
Resolver I

Background color

Is it possible to have same background color for 2 measures in a matrix ?

 

clem312_0-1630499214285.png

 

1 ACCEPTED SOLUTION

@clem312 

You can still use conditional formatting, check the following example. I create a measure to evaluate and apply CF on the background of the sales value measure. I also attached the file

 

 

CF = 

SWITCH(
    SELECTEDVALUE(financials[Country]),
    "Canada", "Yellow",
    "France", "Blue",
    "Mexico", "Pink",
    "Germany", "Green"
    )

 

 

Fowmy_1-1630505841657.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
Fowmy
Super User
Super User

@clem312 


Not sure what exactly is required but you should be able to do it with conditional formatting : 


https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#:~:tex....

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy,

 

Not sure because the conditional formatting wants to change color when a measure reach a defined level.

I want to apply a different background color  for each categorie in the matrix so you can easily see for each brand the rank of the categorie.
"Vehicle handling" should be blue

"Mechanical performance", yellow

etc.

@clem312 

You can still use conditional formatting, check the following example. I create a measure to evaluate and apply CF on the background of the sales value measure. I also attached the file

 

 

CF = 

SWITCH(
    SELECTEDVALUE(financials[Country]),
    "Canada", "Yellow",
    "France", "Blue",
    "Mexico", "Pink",
    "Germany", "Green"
    )

 

 

Fowmy_1-1630505841657.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy 

 

It works fine for the categories. Any idea for the measure that goes with it ?

 

Kind regards

Clement

@clem312 

It doesn't matter which measure is used, you can modify the code for your category and apply.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy 

Because in your file, the selection is mage with the Country on the line but in my matrix on line I have an increasing serie (1, 2, 3, 4, 5) so I can present by descending ordering the favorite topics for each brand. 

Like this :

clem312_0-1630570549279.png

 

 

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.