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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

0

Power Query: Comparison of 18-digit ints yields wrong result

When comparing two 18 digit ints, it's possible to get a true result even when the digits are different. 

 

Example: 2362747255796852672 is equal to 2362747255796852700. I can vary the numbers a bit and still get the same result, e.g. adding multiple zeros to both numbers, varying the three last digits somewhat.

 

henrikj_0-1686898720448.png

 

 

Status: Delivered

Hi @henrikj ,

Because it treats both the numbers as 2.36275E+18, it's by design for a number format.

vyanjiangmsft_0-1687165569890.png

As a workaroud, you can modify the formula to:

if Text.From(2362747255796852672) = Text.From(2362747255796852700) then 1 else 0

 

Best regards,

Community Support Team_yanjiang

Comments
v-yanjiang-msft
Community Support
Status changed to: Delivered

Hi @henrikj ,

Because it treats both the numbers as 2.36275E+18, it's by design for a number format.

vyanjiangmsft_0-1687165569890.png

As a workaroud, you can modify the formula to:

if Text.From(2362747255796852672) = Text.From(2362747255796852700) then 1 else 0

 

Best regards,

Community Support Team_yanjiang