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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Adding Dynamic KPI in TreeMap

I am using TreeMap and I am trying to differentiate the color based on KPI. Instead of a scale of colors, I would just prefer a bianry color option (two).

Say, if any value above the 5, would appear to be in Red and below that would be Green. I tried following this but my KPIs are dynamic and depend on slicer. Say instead of 5 the KPI would be 7 based on another selection from matrix. I would be able to get the selected value as a measure but I guess the table won't update dynamically based on the selection if I need to follow above tutorial.

 

power-bi-details

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Did you create a measure? Based on my test  the conditional formatting could work well based on a measure.

 

 Capture.PNG

 

 

The formula of the measure is:

 

 

Measure = SUM(Table1[value])

For more details, please check the pbix as attached.

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

We can format the visual as the picture below. Then we can get the reuslt as you need.

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

But my KPIs are Dynamic. How would you scale based on that?

Hi @Anonymous,

 

Did you create a measure? Based on my test  the conditional formatting could work well based on a measure.

 

 Capture.PNG

 

 

The formula of the measure is:

 

 

Measure = SUM(Table1[value])

For more details, please check the pbix as attached.

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @Anonymous,

 

Could you please share your sample data or pbix to me? Please upload your file to One Drive and share the link here.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

So the conditional formatting would work only based on a fixed value but my KPI changes based on slicer.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.