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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
GOGIANTS
Regular Visitor

Apply conditional formating to several values based on the highest number

Hello,

 

I am trying to creat a heatmap in PowerBI, I downloaded a custom visual but that one isnt great. I already created a heatmap/table in Excel (pivot table) and applied conditional formating to all the cells which should be included (see image) and it works great.

 

image 2.PNG

 

However, i can't get the same result in PowerBI where i apply conditional formating to all values. When add conditional formating for each value it calculates it also for each value (looks at the highest number in the column instead of entire table). The columns/data are the same in both (excel en powerbi), only difference is that I only loaded a small sample into powerbi.

 

image 1.PNG

 

If anyone got an idea, let me know 😄

2 ACCEPTED SOLUTIONS
negi007
Community Champion
Community Champion

@GOGIANTS in your case, you are adding seperate columns in values field that is why you have to apply conditional formatting seperatly for each columns. I suggest you to combine all these values into one columns using unpivot data feature in power query and then use that column in the value field. this can solve your problem. UnPivoting the data is very easy in power query, you select all columns and then unpivot option. This value create two columms, one for value and second for type of value.

 

hope this solution solve your issue. thanks




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



Proud to be a Super User!


Follow me on linkedin

View solution in original post

I found the solution, instead of pivot i should unpivot the column which turned it into one value. Thanks for guiding in the right direction!

View solution in original post

5 REPLIES 5
negi007
Community Champion
Community Champion

@GOGIANTS what is the conditional that you wish to apply to your data. on what basis color formatting to be applied?




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



Proud to be a Super User!


Follow me on linkedin

image 3.pngWith excel I just used the standard one (RED = HIGH, GREEN = LOW).

negi007
Community Champion
Community Champion

@GOGIANTS in your case, you are adding seperate columns in values field that is why you have to apply conditional formatting seperatly for each columns. I suggest you to combine all these values into one columns using unpivot data feature in power query and then use that column in the value field. this can solve your problem. UnPivoting the data is very easy in power query, you select all columns and then unpivot option. This value create two columms, one for value and second for type of value.

 

hope this solution solve your issue. thanks




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



Proud to be a Super User!


Follow me on linkedin

I found the solution, instead of pivot i should unpivot the column which turned it into one value. Thanks for guiding in the right direction!

My thought was also to pivot the table but somehow this isnt working. when i select the columns which i would like to pivot, the button is "grey".

 

image 4.png

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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