As you dive into Tableau and begin discovering the options to create more metrics, you will come across options such as calculations, parameters and even sets. These options build the foundations for many of the interactivity that comes with Parameter Actions and Set Actions.
To build a Calculation or a Parameter, you can select them from the menu.
Calculated Field
In the Sample Superstore data, there is a calculated field already created for us!
It is the Profit Ratio, where tableau is dividing the sum of profit over the sum of sales. Now tableau will calculate on a row by row basis, hence, the result will be by row as well. A calculated field can also be an if/else statement where you can specify conditions to create the new metrics.
In Calculation1, we have a statement that says, if the discount on an order was 0.8 then give me the order IDs for that order, otherwise give me null. We can see the results on the left where all the order IDs are listed since they had a discount of 0.8!
Parameters
Parameters have slightly different properties when creating them. They can be of various types, allow any inputs, be a list, or a range of numbers. However, it is important to note that a parameter has no information by itself. The power of parameters comes when it is used with metrics such as a calculated field!
Photo by Nathan Dumlao on Unsplash