Not only in Excel, rounding is necessary in Power Pivot or Power BI as well. Functions are similar, but not the same.

So which functions can we used in DAX?

ROUND

Basic rounding function. Its syntax is very simple – what is rounded and how many decimals do we need. For rounding “to the left” from decimal point we use negative numbers.

To round 123,456 to hundredths, lets write:

  • =ROUND(123,456;2)

which results in:

  • 123,46

To round the same number to tens, write:

  • =ROUND(123,456;-1)

and the result is:

  • 120

ROUNDDOWN, ROUNDUP

These work similarly, just round up or down.

MROUND

MROUND works similarly to older versions FLOOR and CEILING – instead of number of digits we use multiples. So for hundredths use 0,01 or for tens use 10. You can also round to, lets say fives or fifties (5, 50)…

Leave a Reply

Your email address will not be published.

*

clear formPost comment