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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

DAX - Why Does 3.3/1.1 = 2.9999999999999997?

Hi

 

I have a simple calculation which divides one number by a second number and then puts the result into buckets. However i have found results in the wrong bucket because some simple divisions are coming up with some strange answers.

 

 
I find that when using decimals some calculations don't come out correctly and therefore end up inthe wrong bucket. If you add this calculated column to any workbook
test_calc = DIVIDE(3.3,1.1) = 2.9999999999999997
you get the answer TRUE
 
because the bucket this calcuation should be in is equal to or greater than 3 it is falling in the wrong place.
 
 
Does anyone know why this happens, and any way to make this calculate correctly? Not looking for a work around (i.e. rounding), looking for understanding and/or solution.
 
3 REPLIES 3
amitchandak
Super User
Super User

I tried the same, but Power BI does not allow me to show more than 15 decimal places. So I am getting 3. In your case, it is 16.

I think this is true with all decimal place calculation. Ultimately these calculations happen in binary were decimal place has an accuracy level. 

Anonymous
Not applicable

It does display as 3 for me too, but if I try to use a logic operator it doesn't come out right. If you try a calculated column like 'test_calc = 3.3/1.1 = 3'. It will be False 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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