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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rozz
New Member

Category values visibility

Hi All,

I need to show % of grand total based on 4 categories in my report. Value for each category should be possible to read.

I tried Treemap but it does not display blue category value in the way that you can read it. 

Unfortunately I do not have enough space in my report to widen this chart. 

 

Treemap.png

The same story with stacked bar chart.

 

stacked column chart.png

 

I decided to put that in the table. The issue that I'm strugling with is to color columns.

 

table.png

I would like to color each category column by it's own like it is on the treemap and stacked bar chart. Is there any way to do that?

Also is there possibility to adjust treemap or stacked bar chart so it shows values for all items? I tried to format font but it does not work the way it should. 

 

Below sample table that I used:

Category 1 14
Category 2 120
Category 3 30
Category 4 40

 

Thanks in advance for help!

 

 

1 REPLY 1
amitchandak
Super User
Super User

@Rozz , Both treemap, and Stacked do not support conditional formatting with legend.

Create a measure like given below and use that in matrix with "Field" option

color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)

 

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

 

Size by % will be issue there

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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