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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PowerWhy
Helper III
Helper III

"Less than" filter being treated as "less than or equal to"

Hi,

 

Sometimes I'm finding that dax filters treat less than conditions as "less than or equal to". I've managed to recreate the issue in a mockup below

https://www.dropbox.com/s/1zsqsk2hexw5rfz/Test%20-%20less%20than%20filter%20being%20treated%20as%20l...

 

I have 3 records, each of which have % billable hours of 40%. When I filter by less than 40% then one of the rows still appears in the right hand table. Please do you know why? (I do think think the calculation is exactly 40.00% so I don't think it's a rounding issue ??!)

 

screenshot.PNG

 

Many thanks for your help,

 

CW

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @PowerWhy 

 

Using Round function on the result seems to resolve this error.

vjingzhang_1-1666073975176.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

johnt75
Super User
Super User

My mistake, you are correct. 

This certainly appears to be a bug - https://dax.do/wdpI15j9yJxHHp/. You should raise it with Microsoft.

PowerWhy
Helper III
Helper III

sorry it is 688.8 not 688 ?

johnt75
Super User
Super User

It's a rounding issue. 688 / 1722 = 0.39953....

If you want to ignore so many decimal places you could change your measure to be

% Billable hours, measure = ROUND( divide(calculate(sum('Test table'[Billed Hours])),calculate(sum('Test table'[Hours Worked])),0),2)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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