MROUND in Power Query

Iron Contributor

Is there an easy alternative for MROUND() in Power Query?

I know the Number.Round functions, but I find no direct alternative for MROUND()?

5 Replies

Thanks for the link. Great solution, but a bit overly complicated for my use-case, I think (multiples of integers, instead of rounding behind the comma).

I've been experimenting a bit more, and came up with this (for rounding up to multiples of 50)

=Number.RoundUp([Decimal]/50)*50

@bartvana 

I guess it shall be just round, not up

=Number.Round([Decimal]/50)*50
Also possible, depending on the use case of course. (In my case I needed rounding up.)

@bartvana 

Oh, I see. When as variant

[Decimal] - Number.Mod([Decimal], 50) +50