KNOWLEDGE BASE

Displaying Measures Dynamically


Published: 04 Apr 2017
Last Modified Date: 21 Jun 2017

Question

How to use Measure Names and Measure Values to set up a quick filter that swaps out the specific measures that are used in the view.

For example, you may have a view showing Sales over time. You have another view showing Profit over time. Instead of maintaining these two on separate sheets, you can create a single view with a quick filter that lets you switch between showing Sales, Profit, and any other measure of interest.

Environment

Tableau Desktop

Answer

  1. Connect to a data source. (This article uses the Coffee Chains sample data source that comes with Tableau Desktop)
  2. Drag the "Date" field to the Columns shelf.
  3. Drag the "Measure Names" and "Measure Values" the Rows shelf.
  4. Drag the "Market" field to Color.
    • You will notice that "Measure Names" is automatically added to the Filter shelf.
  5. Right-click on "Measure Names" in the Filter shelf and select Show Filter.
  6. Open the quick filter menu by clicking the arrow in the upper right corner and select the filter type of your choice.
As you select measure names in the quick filter, the view updates to show just that measure over time. 

Additional Information

To view the above steps in action, see the video below: 
Did this article resolve the issue?