Tableau provides many predefined functions that help us manipulate data in a certain way. These functions are divided by the type of manipulation, such as functions of numeric and string data types, or aggregate operations.
Let's use the sample file Sample – Superstore Sales (Excel)
. Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.
Once the data is loaded on the worksheet, perform the following steps to create a new calculated field:
SquareRootofSales
as shown in the following screenshot:SQRT([Sales])
and hit OK.Using a predefined function, we created a field that houses the square root values of the Sales field. This newly created field can be used similarly for other existing fields, as shown in the created chart. Taking the square root of numeric values is a common data-transformation technique used to better observe the distribution of values, including outliers. You can see from the previous chart that the SquareRootOfSales values are spread more than the original sales values, which are more clustered around certain areas.
You can learn more about data transformation objectives and techniques from the lecture slides of Regression III: Advanced Methods Workshop by William Jacoby at http://polisci.msu.edu/jacoby/icpsr/regress3/lectures/week1/4.Transformations.pdf.