In-depth analysis of any problem expects you to play with data, find out the connection between the variables and draw insights from it. The first task habitually always turn out to be creating the calculated fields using two or more variables.
Learning how to create a calculated field in a new tool is among the first thing to learn if you are crunching numbers all day. In this post, I will share it with you how to create a calculated field in Tableau with the help of a problem.
It’s the end of the year, and that means for annual bonuses! The store operates in three regions an only the top performing employees in each region qualifies for a bonus. Find out which three employees are eligible to get bonuses for this year. Employees are rank on total sales($).
ALSO READ: HOW TO CONNECT TABLEAU TO CSV DATAFILE
On the left, under Data we have two tabs which go by the name Dimensions and Measures. In Tableau, all the categorical variables are clubbed together in Dimensions, and all the variables with numerical values are clubbed together in Measures.
Note: Observe there is no Variable for Total Sales in Measures.
I have dragged Representative and Region variables from Dimension in column tab, and Sum of units from Measures in Rows tab. From the above image Alex, Richard and James are the apparent winners. But if you scroll above and read the question once again, the problem states that employees are rank on Total Sales($).
Let’s create a calculated field for Total Sales which would be the product of Units and Unit Price.
On right clicking under measures, you will get a menu where it asks to create a calculated field at the top. Click on it. The form will pop just like an image below. Enter the ‘Total Sales’ as a name of the new field and beneath it multiply two required variables.
Replace the Sum of Units from the row tab with Total Sales, and you will have an entirely new result. Mathew, Susan and James are the new winners.
If you have any further questions regarding calculated fields, please do let me know in comments section.