Conditional formatting with switch metric

I have a problem with conditional formatting in a table. I am using a metric using a switch function. When I choose the “conversion” metric, it shows me wrong formatting

Sample heat map.pbix (49.1 KB)

Hello @Harris,

Thank You for posting your query onto the Forum.

Well the reason why the formatting is not working for the “Conversion” metric is because you’ve used the “FORMAT()” function and the only disadvantage of this function is that it converts the value to a “Text” in a specified format.

Now, since the value is converted into a text format, conditional formatting will not work since it longer retains any numerical value.

To prove the case, I created a lone measure with “Percentage” format and see it doesn’t allow to select that measure under the conditional formatting option and goes in “Grey” color. Screenshot provided below for the reference -

Previously as well similar queries were posted by the members over the forum below is the link provided and you can check out those links.

My apologies but as of now Power BI doesn’t have the option of using formatted text whenever “FORMAT()” function is used within it.

Hoping you find this helpful. :slightly_smiling_face:

Note: Please click onto the link and not onto the “Expand/Collapse” in order to view the entire post.

Thanks and Warm Regards,
Harsh

Sample heat map.pbix (50.7 KB)

2 Likes

Hello @Harris,

So the only alternative here in this case is to create two different measures and create two different table visuals, lay them over one another and use the “Buttons and Bookmarking” technique.

I’m attaching the working of the PBIX file for the reference as well as providing few of the links below pertaining to the “Buttons and Bookmarks” technique.

Hoping you find this alternative useful and meets your requirements for analysis. :slightly_smiling_face:

Thanks and Warm Regards,
Harsh

Sample heat map - Harsh.pbix (52.5 KB)

2 Likes