Forum Discussion
Rounding whole numbers formula DAX
Hi all,
Is there a way to use the DAX formula to round whole numbers by only changes of 5? So if I have 11 I want the result to be 10, if I get 14 I want the result to be 15.
Appreciate the help!
Not sure what you mean. You can use the column or expression value in the MROUND function. For example,
NewColumn = MROUND(Table[NumberColumn], 5)
Pat
5 Replies
- mahoneypat
Microsoft Employee
You can use the MROUND function for that. For example, MROUND(14, 5) = 15
Pat
- Scaffnull
Helper I
mahoneypat Thanks! And if I have rows with different values, is there a way to optimize that? For example I have 132 (want 130), 33 (want 35) and so on...
- mahoneypat
Microsoft Employee
Not sure what you mean. You can use the column or expression value in the MROUND function. For example,
NewColumn = MROUND(Table[NumberColumn], 5)
Pat
- Scaffnull
Helper I
Almost found a solution, with: New column = ROUND(Table[ColumnName], -1)
The rounding goes to closes 0...but for instance that 44 go to 40 I rather have it 45. Will keep trying😊