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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.