Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
When I round a number to zero decimal places and then convert to text I get a suprious ".0" added to any values that end in .5
For example:
let
Input = 12.5,
Output = Text.From(Number.Round(Input))
in
Output
Returns "12.0" rather than "12"
I can fix my output easily enough, but could someone please explain why this happens?
Number.Round has a second parameter which takes the number of decimal places. As a result this returns a number which in its base form is floating point. You can use Int64.From(x) to convert a floating point number to an integer based number
Thanks @artemus . That's what I've ended up doing, but I don't really see why I have to. Even when I specify 0 as the second parameter I end up with a number that is shown to 1dp. Wouldn't you expect Number.Round to take care of this itself?