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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ts94
New Member

Display legend for conditional formatting

Hi,

 

I have created a treemap and applied some conditional formatting for the color in that treemap. When setting the legend to show, it only shows me in which color the corresponding category was colored but not based on which rule. I applied color gradient for the conditional formatting btw, so it should be fairly easy to display that as a legend, technically at least. In Tableau this was always very easy. Maybe someone knows a way? Or is this simply not possible in PowerBI?

 

Following screenshot shows my example a bit more in detail:

The country is my category and then the tiles sizes are based on application number. The color however is a conditional formatting based on a conversion ratio. And you can also see that the legend shows exactly what I have explained above. I would rather want to see a bar that shows the gradient from 0% to 100% conversion ratio.

ts94_1-1755613377977.png

 

Thanks!

BR,


Tim

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@ts94 I just did this in my Power BI World Championship EU submission. Life in Europe by Greg Deckler - Microsoft Fabric Community. It is on the Interactive Explorer. page.

 

In the conditional formatting area, clip the gradient and place it on the page over top of the legend area. Bit hacky but works well. I also created measures for min and max and used Card visuals overlaying the gradient at both ends.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
v-venuppu
Community Support
Community Support

Hi @ts94 ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @Greg_Deckler @wardy912 for the prompt response.

Thank you for confirming that the suggestions provided by @Greg_Deckler  helped in resolving the issue. Please let us know if you have any further question, we would be happy to address.

wardy912
Solution Sage
Solution Sage

Hi @ts94 

 

 This isn't possible in the standard treemap visual, gradient legends are only supported in bar charts, scatter charts and maps.

 

 

Greg_Deckler
Community Champion
Community Champion

@ts94 I just did this in my Power BI World Championship EU submission. Life in Europe by Greg Deckler - Microsoft Fabric Community. It is on the Interactive Explorer. page.

 

In the conditional formatting area, clip the gradient and place it on the page over top of the legend area. Bit hacky but works well. I also created measures for min and max and used Card visuals overlaying the gradient at both ends.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hey Greg,

 

thanks for your suggestion. Just so that I am sure I get it right: You say I should screenshot the gradient and then insert card visuals to display the bottom and top of the gradient? I mean sounds very creative and sure it works fine but it is a bit sad that this is what you have to go down in order to display something very simple. 😄 I start disliking PowerBI a bit compared to Tableau to be honest 😄

 

BR,


Tim

@ts94 Oh, trust me, everything in Power BI is a complete and utter hack.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors