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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Mk2018
Frequent Visitor

DAX IF Calculation error

Hi, 

 

I have been using the 'IF' calculation for a report i am working on. The calculation is using categorising time values into a time period. 

 

For example,

 

IF('_____________'[_______]}>("00:00:00") && [_______]<("00:04:59"),("< 5 mins), and so on..

 

This calculation is working fine for each Processing time (e.g. < 5 mins, 5-10 mins, etc). However, Power BI is not categorising the values that have '59' as the seconds (e.g. 00:04:59, 00:05:59, etc.). All other values are being put into the correct categories but not these sort of values. I have changed these firgures but the values with "59" as the seconds are being put into a (blank) category. 

 

Hope this make sense.

 

Thanks 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Replace the < with <= or if you want to keep the < change the comparison value:

 

IF('_____________'[_______]}>("00:00:00") && [_______] <= ("00:04:59"),("< 5 mins)

 

IF('_____________'[_______]}>("00:00:00") && [_______] < ("00:05:00"),("< 5 mins)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Replace the < with <= or if you want to keep the < change the comparison value:

 

IF('_____________'[_______]}>("00:00:00") && [_______] <= ("00:04:59"),("< 5 mins)

 

IF('_____________'[_______]}>("00:00:00") && [_______] < ("00:05:00"),("< 5 mins)

IF('_____________'[_______]}>("00:00:00") && [_______] <= ("00:04:59"),("< 5 mins)

 

this worked!! 🙂 thank you for your help 

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.