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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Saxon10
Post Prodigy
Post Prodigy

Conditional formatting for slicer

I have two columns are team and colour code.

I updated the colour code against against each teams.

 

I am trying to apply conditional formatting based on the colour code colum in slicer row level.

 

Any advise please.

 

IMG_20210629_161602.jpg

2 ACCEPTED SOLUTIONS
CNENFRNL
Community Champion
Community Champion

Interesting little trick

Screenshot 2021-06-29 221433.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

Hi @Saxon10 ,

 

Using a matrix and an additional column on all rows saying team you can add what you need follow the steps below:

  • Create a colum with the following code (just used to show the Team word on rows):
Cat = "Team"
  •  Create a matrix with the following setup:
    • Rows: Cat
    • Columns: Team
    • Values: Team
  • Condittional format the values:
    • Background: Values from the color column

MFelix_0-1625042043646.png

  • Font all white:

MFelix_1-1625042079068.png

  • Turn off subtotal
  • Make the font color and background of the column headers white

Final result below and in attach PBIX file.

MFelix_2-1625042273366.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
CNENFRNL
Community Champion
Community Champion

Interesting little trick

Screenshot 2021-06-29 221433.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thanks for your reply.

I would like to get the same result but in horzisantl wise instead of vertical wise. Is that possible?

Can you please advise. 

Hi @Saxon10 ,

 

Using a matrix and an additional column on all rows saying team you can add what you need follow the steps below:

  • Create a colum with the following code (just used to show the Team word on rows):
Cat = "Team"
  •  Create a matrix with the following setup:
    • Rows: Cat
    • Columns: Team
    • Values: Team
  • Condittional format the values:
    • Background: Values from the color column

MFelix_0-1625042043646.png

  • Font all white:

MFelix_1-1625042079068.png

  • Turn off subtotal
  • Make the font color and background of the column headers white

Final result below and in attach PBIX file.

MFelix_2-1625042273366.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you so much for your help and advice.

 

The solution is really nice and I don't need to change the data.

 

Thank you so much. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors