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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Floating Point Rounding Error

I am having an issue with a DAX query where when I use the numbers directly I am getting the intended result but as soon as I use the numbers from the columns it is giving me an improper number. For example, when I use this 

Amount =
VAR Result = 22294.16 * 0.04744
VAR TruncatedResult = FLOOR(Result, 0.001)
RETURN TruncatedResult

 

The amount is being returned properly as 1057.634, however when I put in the columns as seen below

 

Amount =
VAR Result = Table[Column1] * Table[Column2]
VAR TruncatedResult = FLOOR(Result, 0.001)
RETURN TruncatedResult

The truncated result is giving me 1057.635.
 
I have already checked and both columns when directly displayed are giving the proper and expected numbers, the issue only occurs when I am doing the multiplication with these columns though.
Status: Investigating
Comments
Anonymous
Not applicable

Hi @empyr ,

 

I used the data you provided and failed to reproduce your problem. But I changed the parameter of floor and it showed the wrong answer:

vtianyichmsft_0-1723699613630.png

vtianyichmsft_1-1723699627820.png

 

Best regards,
Community Support Team_ Scott Chang