Reputation: 75
How to round to the nearest;
For example formular we use ceiling(10,30) within excel which would give us 30, how do we do that within PowerQuery to get the same results?
Upvotes: 1
Views: 1648
Reputation: 511
Number.Round()
Full details here:
https://learn.microsoft.com/en-us/powerquery-m/number-round
Additional Info as you've mentioned Round in the Subject and problem detail, but then used Ceiling as well. I don't think Ceiling exists in M, so you will have to use some extra math such as the following.
(Number.RoundUp([number]/30))*30
In the above formula, [number] is your starting number and 30 represents the significance. On some test data:
Upvotes: 2