Hi everyone!
This week we've been taking a deeper dive into Tableau Prep where we were asked to round a value to the nearest 10's in the Preppin' Data 2022 Week 31 Challenge.

Although you can do some finnicky clean steps to round things properly (ie removing the last digit and adding a 0), a more surefire way to address this is by using the ROUND function - this will ensure consistency throughout the data, even if values contain a different number of digits.
Structure of the ROUND function

Number = the number/field of numbers that you wish to round
Decimals = the extent to which you want to round (1dp, 2dp etc)
How to round to larger values
As rounding to 1dp = 1 and 2dp = 2 in the decimal field, to round to larger values, you simply need to include negative values.
Round to the nearest 10 = -1
Round to the nearest 100 = -2
Round to the nearest 1000 = -3
Here is how using different [decimal] values in the ROUND field affects Sales data (using Sample - Superstore data):

The first Sales field shows the original dataset, whilst the remaining headers show what I inputted into their respective Calculated fields to make it easier to understand how the [decimal] input works.
Happy rounding!
H