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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Fusilier2
Helper V
Helper V

Conditional formatting help

I have this measure that calculates the difference between This month and the previous month:

Headcount Excl Casuals month on month = HR_data[Headcount excl casuals Current Month]-HR_data[Headcount excl casuals Prior month ]
 
The value returned is a number.
 

I'm trying to add conditional formatting shapes to it in a table. If I right click on 

the measure and select 'conditional formatting/icons I get this:

Monday1.PNG

I'm trying to set it so if:

Value >= min and <0 RED icon

            = 0 YELLOW icon

           > 0 and <= Max Green icon

 

But I'm getting an error on the first rule and for some reason the second two are showing Percent not Number.

Monday2.PNG

Can anybody see what I'm doing wrong?

 

1 ACCEPTED SOLUTION
Fusilier2
Helper V
Helper V

For some reason its working now. I deleted the suggested rules and added some new one's in.

View solution in original post

4 REPLIES 4
Fusilier2
Helper V
Helper V

For some reason its working now. I deleted the suggested rules and added some new one's in.

SamWiseOwl
Super User
Super User

Hi @Fusilier2 

Have you considered using a measure to do the formatting?
Icon Measure =
var Diff = [Headcount Excl Casual Month on Months] --stores the measure result
Return

Switch(
TRUE()--test if the following is true

,Diff  < 0 , "🔴" --Use Windows + . for the emoji keyboard

,Diff = 0, "🟡"
,Diff > 0, "🟢"

)

 

SamWiseOwl_0-1747045488810.png

 

As for why it is showing as percentage only.

Is there any formatting being applied to the measure that might be confusing it?


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

GrowthNatives
Super User
Super User

Hi @Fusilier2 , You're encountering the error because of a mismatch between data type and rule configuration.

Why You're Getting the Error:

  • Your measure returns numeric values (like -3, 0, 4), not percentages.
  • But in your conditional formatting rules, you're using "Percent", which expects values between 0 and 1 (i.e., 0%–100%).
  • So value < 0 (Percent) is invalid, causing the red icon rule to error out.

How Fixing to "Number" Helps:

By changing each dropdown to "Number":

  • Power BI will compare your measure against actual numbers like 0 and Max.
  • The logic value < 0, = 0, and > 0 will work as expected.

Set up the icon rules like this:

  • Red icon: If value < 0 → Number
  • Yellow icon: If value = 0 → Number
  • Green icon: If value > 0 → Number

This configuration will correctly apply icons to your Headcount Excl Casuals month on month measure based on the direction of change.

Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
🚀Let’s keep building smarter, data-driven solutions together! 🚀[Explore More]

I can't change Percent to Number because the dropdown box is greyed out.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.