Dax formula to round to the nearest 10th

shophoney

Active Member
Joined
Jun 16, 2014
Messages
286
Hi I have a discount column that i would like to round the values to the nearest 10th or to 5th.

So a result of 24.9 = 25%

21.2 = 20%

57.1 = 55%


=MROUND(1-('SALES TABLE'[NET RETAIL]/'SALES TABLE'[RETAIL]),.1)

​Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi!

I don't get it.
I've done several tests here and it works fine.

For example, 1-(35/49)=0,285714
Then I do: =MROUND(1-(35/49),0,05) and it results 0,3, or 30%.

Select the cell with error, then try shift+F3 for the formula dialog box. Then change an element in the formula and watch results.

Godspeed!
 
Upvote 0
Hi!

I don't get it.
I've done several tests here and it works fine.

For example, 1-(35/49)=0,285714
Then I do: =MROUND(1-(35/49),0,05) and it results 0,3, or 30%.

Select the cell with error, then try shift+F3 for the formula dialog box. Then change an element in the formula and watch results.

Godspeed!

"Calculation error in column 'SALES TABLE'[]: An argument of function 'MROUND' has the wrong data type or the result is too large or too small."
 
Upvote 0
If you click on the error icon in the column you should get an explanation for the error. What does it say?
 
Upvote 0
This is the message i get. It shows ERROR and more info is :"Calculation error in column 'SALES TABLE'[]: An argument of function 'MROUND' has the wrong data type or the result is too large or too small."

Could it be from a divide error.

If the 2 values are equal?

=MROUND(1-('SALES TABLE'[NET RETAIL]/'SALES TABLE'[RETAIL]),0.05)
 
Upvote 0
Hi still having issues with rounding.

I found this old formula i used before. But I need to round to the 10th. IE 10%, 20%...

=iferror(round(if(OR([NET RETAIL]=0,[NET RETAIL]<0),0,if([NET RETAIL]<1,1,(1-([NET RETAIL]/(-[DISCOUNT]+[NET RETAIL]))))),1),0)

Thoughts?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top