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
MarceloVieira
Helper II
Helper II

Heatmap-like effect in Matrix Visual

Hello Everyone,

 

I'm trying to apply conditional formatting in Power BI to color the cells based on their values, using a heatmap-like effect (e.g., lower values in red, higher values in green, with a gradient in between).

 

However, I want the color scale to be applied within each row's context, not based on the global minimum and maximum across all rows. In other words, each row should have its own independent color range instead of a single scale for the entire dataset.

What would be the best approach to achieve this? Should I use a DAX measure, or is there another way to set up the conditional formatting dynamically?

Any help would be appreciated!

 

pbix sample: https://drive.google.com/file/d/1ePFIngH_qERC_mDt5yKcwmqiEsUaqz_k/view?usp=sharing

 

Similar effect desirable: 

MarceloVieira_0-1740512002336.png

 

In the actual dataset, the A, B context has several rows (like a hundred). We will navigate the report page with some filters, but the formating should work properly with or without any filtering.

 

*There is 2 page filters that are always active across all report pages.

1 ACCEPTED SOLUTION
MarceloVieira
Helper II
Helper II

Thks @Ashish_Mathur + @Greg_Deckler !!!

 

I was showing these proposals to the client, and we ended up opting for a manual solution, defining ranges and colors, which is also not perfect but was considered an acceptable solution.

MarceloVieira_0-1740673461032.png

 

View solution in original post

3 REPLIES 3
MarceloVieira
Helper II
Helper II

Thks @Ashish_Mathur + @Greg_Deckler !!!

 

I was showing these proposals to the client, and we ended up opting for a manual solution, defining ranges and colors, which is also not perfect but was considered an acceptable solution.

MarceloVieira_0-1740673461032.png

 

Ashish_Mathur
Super User
Super User

Hi,

Not perfect but can you live with this

Ashish_Mathur_0-1740528027905.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

@MarceloVieira See if this helps. Also, I would create a measure for returning your colors, this will give you full control over context, etc.



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
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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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