MROUND in Power Query

%3CLINGO-SUB%20id%3D%22lingo-sub-2081608%22%20slang%3D%22en-US%22%3EMROUND%20in%20Power%20Query%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081608%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20an%20easy%20alternative%20for%20MROUND()%20in%20Power%20Query%3F%3C%2FP%3E%3CP%3EI%20know%20the%20Number.Round%20functions%2C%20but%20I%20find%20no%20direct%20alternative%20for%20MROUND()%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2081608%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBI%20%26amp%3B%20Data%20Analysis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20BI%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081674%22%20slang%3D%22en-US%22%3ERE%3A%20MROUND%20in%20Power%20Query%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081674%22%20slang%3D%22en-US%22%3EThis%20may%20help%20%3CA%20href%3D%22https%3A%2F%2Fwww.myonlinetraininghub.com%2Fexcel-forum%2Fpower-query%2Fmround-equivalent-in-pq%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.myonlinetraininghub.com%2Fexcel-forum%2Fpower-query%2Fmround-equivalent-in-pq%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081716%22%20slang%3D%22en-US%22%3ERE%3A%20MROUND%20in%20Power%20Query%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081716%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20link.%20Great%20solution%2C%20but%20a%20bit%20overly%20complicated%20for%20my%20use-case%2C%20I%20think%20(multiples%20of%20integers%2C%20instead%20of%20rounding%20behind%20the%20comma).%3C%2FP%3E%3CP%3EI've%20been%20experimenting%20a%20bit%20more%2C%20and%20came%20up%20with%20this%20(for%20rounding%20up%20to%20multiples%20of%2050)%3C%2FP%3E%3CP%3E%3DNumber.RoundUp(%5BDecimal%5D%2F50)*50%3C%2FP%3E%3C%2FLINGO-BODY%3E
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