Wednesday, June 28, 2023

Explain the Table Calculation Function 'RUNNING_MIN' in Tableau with Example?

 The RUNNING_MIN function in Tableau is a table calculation function that calculates the running minimum value of a field or expression over a specified scope or order. It provides the minimum value observed up to the current data point within the defined scope.

The syntax for the RUNNING_MIN function in Tableau is as follows:

RUNNING_MIN([expression])

  • [expression]: The field or calculation for which you want to calculate the running minimum.

Here's an example to demonstrate how to use the RUNNING_MIN function in Tableau:

Suppose you have a dataset that contains daily stock prices for different companies. You want to calculate the running minimum stock price for each company over time.

  1. Open Tableau and connect to your dataset.
  2. Create a view that includes the "Company" field, the "Date" field, and the "Stock Price" field.
  3. Right-click on the "Stock Price" field in the view and select "Add Table Calculation."
  4. In the Calculation Type drop-down, select "Running Min."
  5. In the "Compute Using" section, choose the appropriate dimensions to define the partitioning and addressing for the calculation (e.g., "Company" and "Date").
  6. Click "OK" to apply the table calculation.

Tableau will calculate the running minimum stock price for each company over time. It identifies the minimum observed price starting from the first data point and continues tracking the minimum value with each subsequent data point within the defined scope.

You can further customize the view, apply sorting, or add additional calculations based on the running minimum. For example, you can create a visualization that shows the trend of the minimum stock price for each company or identify periods with the lowest stock prices.

The RUNNING_MIN function allows you to calculate the running minimum of a field or expression within a specified scope. It helps you identify the lowest value observed up to the current data point and track the minimum value over time or within a particular grouping

No comments:

Post a Comment

If you have any doubts. Please let me know

How can you create an alias for a table in a SQL query?

In SQL, you can create an alias for a table in a query to give the table a temporary, alternative name that you can use in the query. Table ...