When applied to a single field in an aggregate calculation, the MIN function (minimum function) returns the minimum value. Furthermore, the MIN function can also be used for the minimum of two arguments. 1)
The datasource don’t always provide all information necessary to answer every questions the user has. By using user-defined input entered in parameters, additional data can be added to the visualization that enhances content.
These functions and syntax of Tableau´s calculated field looks familiar to SQL statements. While creating the parameter in the formula-editing window, it provides help and error-checks the syntax of the formulas the user creates. 2)
The formula editor also offers a color encoding to identify fields, functions and parameter entries.
The syntax of functions is broken down, and each entry contains one to three examples.
As already stated, the MIN function either can be used with one or two arguments for returning the minimum value. The following example shows the usage of one argument.
For instance, you want to check the minimum unit price for each product sub-category. First you have to create a new “Calculated field” by right-click into the “Measures” field, and choose “Create” and afterwards “Calculated field…”.
After that, you are able to name the new calculated field. In this example we named it “MIN_SubC_UnitPrice”. In the field, we have set the MIN function by selecting the right field, in our case it is the “Unit Price” field. Then click ok.
For visualization add the “Sub-Category” to the “Columns” field dimensions as well as the new measure “MIN_SubC_UnitPrice” to the “Rows” by simple drag and drop.
As a result, it is easy to see that most of the sub-categories have a minimum unit price under 20 dollar. Only the sub-category “Copiers and Fax” has a minimum unit price about 200 dollar.
If you are using two arguments, they must be of the same type. If either argument is NULL, the function returns NULL.
For instance, you want to check the minimum unit price in conjunction with the minimum discount for each sub-category. As both fields have to be of the same type, these field are float types.