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
CPNLddl
Frequent Visitor

Measures and numbers can't be used in IF formula anymore it seems

Hi, 

 

I really hope you can help me. I've written some calculated columns with IF statements. These all worked, but now that I want to adjust my formula, the old one doesn't even work anymore.

This happens in IF statements where the logical test is to define values. 

 

I tried creating a new IF formula to see what goes wrong, and the following happens;

I can't use numbers in the logical test part anymore. I've checked that the column that I'm referring to is a number, but when I write

 

 

=IF([Number of received emails]>10,">10","Other")

 

[number of received emails] is a measure

 

Power BI doesn't recognize this as a logical test anymore, I can only use text values in the logical test. This wasn't the case before, does anyone know why this happens?

 

Thanks!

 

 

1 ACCEPTED SOLUTION

Hi, Thanks!

I will use this formula, that looks good 🙂

I found out what the problem was: my language settings weren't English, which caused Power BI to not recognize the formula. Really appreciate the fast replies, super nice, thank you again!

View solution in original post

4 REPLIES 4
jdbuchanan71
Super User
Super User

@CPNLddl

 

I was not able to replicate the problem you are running into but let me know if I missed something.

 

Tables of data that has a count of emails.

logic_emails.JPG

 

A measure to sum the # of emails

# Emails = SUM(Emails[emails])

The data table is joined to my users table and I was able to apply the logic in the Check column.

logic_users.JPG

 

This is what youare trying to do, yes? 

Yes, exactly!

And in your example it works, but in my version it doesn't..

 

I've also opened a new Power BI document, and loaded data with a column 'employees national', this field type is whole number. And then also the IF statement doesn't recognize the logical test.

 

 

The IF statement only works when I put text in the logical test while I need to use functions for numbers. 

Here's the whole formula:

Range received formula doesn't work.PNG

 

And here's an example of what happens when I try to use the IF statement with numbers/values:

 

emp nat.pngEmployees national.pngin the description the 'ResultIfTrue should now be bold, but it's not. If I replace >100 for ="100" the formula is recognized, but that's not correct, nor what I need.

 

can you help? 🙂

 

You need a space between your check and the && so instead of

if([Sum Received Organixation])>0&&

if([Sum Received Organixation])>0 &&

 

You can also invert your formula to make it easier, start from the top end and work down, that way you don't need to use &&

 

Range Received = 

IF ([Sum Received Organisation] > 300 , "f. +300",

IF ([Sum Received Organisation] > 200 , "e. 201-300",

IF ([Sum Received Organisation] > 100 , "d. 101-200",

IF ([Sum Received Organisation] > 50 , "c. 51-100",

IF ([Sum Received Organisation] > 10 , "b 11-50",

IF ([Sum Received Organisation] > 0 , "a 1-10",

IF ([Sum Received Organisation] = 0 , "0" , "Error" )))))))

Hi, Thanks!

I will use this formula, that looks good 🙂

I found out what the problem was: my language settings weren't English, which caused Power BI to not recognize the formula. Really appreciate the fast replies, super nice, thank you again!

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.