Forum Discussion
DecimalNumber with 15 max limit not working while aggregation
- 1 year ago
The calculation order of double-precision floating-point numbers may lead to different results because the last digit is rounded differently in the calculation. For example, the following example:
List.Transform({{-0.4, 0.1, 0.2, 0.3, -0.31, 0.1, 0.01}, {-0.4, 0.1, -0.31, 0.1, 0.01, 0.2, 0.3}}, List.Sum)Numbers in Power Query are all treated as double-precision floating point numbers, but some functions can specify the calculation precision (double-precision floating point or fixed-digit decimals), such as the following example:
List.Transform({{-0.4, 0.1, 0.2, 0.3, -0.31, 0.1, 0.01}, {-0.4, 0.1, -0.31, 0.1, 0.01, 0.2, 0.3}}, each List.Sum(_, Precision.Decimal))This is difficult to guarantee in DAX because the only currency types that guarantee precision are only accurate to 4 decimal places.
The calculation order of double-precision floating-point numbers may lead to different results because the last digit is rounded differently in the calculation. For example, the following example:
List.Transform({{-0.4, 0.1, 0.2, 0.3, -0.31, 0.1, 0.01}, {-0.4, 0.1, -0.31, 0.1, 0.01, 0.2, 0.3}}, List.Sum)
Numbers in Power Query are all treated as double-precision floating point numbers, but some functions can specify the calculation precision (double-precision floating point or fixed-digit decimals), such as the following example:
List.Transform({{-0.4, 0.1, 0.2, 0.3, -0.31, 0.1, 0.01}, {-0.4, 0.1, -0.31, 0.1, 0.01, 0.2, 0.3}}, each List.Sum(_, Precision.Decimal))
This is difficult to guarantee in DAX because the only currency types that guarantee precision are only accurate to 4 decimal places.