Loading

Drilling Down Selectively on Hierarchy Level

Publiceringsdatum: Feb 24, 2026
Uppgift
How to selectively drill down (expand) levels of a hierarchy. For example, how to display all quarters in the view, but display months only for Q3.
Steg

Use the following workaround to display months only for Q3.

Step 1: Create a Parameter

  1. In Tableau Desktop, connect to the Superstore sample data.
  2. Right-click in the Data window and then select Create Parameter.
  3. In the Create Parameter dialog box, do the following, and then click OK:
    • Name the parameter. In the example workbook, the parameter is named Quarter.
    • For Data Type, select Date.
    • For Allowable values, select Range.
    • Click the boxes next to Minimum and Maximum, and keep the default values.
    • Click the box next to Step size, select 1, and then select Quarters from the drop-down list.
  4. Right-click the new parameter and then select Show Parameter Control.

Step 2: Create a Calculated Field

  1. Select Analysis > Create Calculated Field.
  2. In the Calculated Field dialog box, do the following, and then click OK:
    • Name the calculated field. In the example workbook, the calculated field is named Telescope Months.
    • In the formula field, create a calculated field similar to the following:
      IF DATEPART('quarter',[Order Date])=DATEPART('quarter',[Quarter]) 
      THEN DATENAME('month',[Order Date])
      ELSE "ALL"
      END

Step 3: Build the View

  1. Drag Order Date to Rows.
  2. On Rows, right-click YEAR(Order Date), and select Quarter (Q2).
  3. Drag Sales to Columns.
  4. Drag Telescope Months to Rows.
Knowledge-artikelnummer

001458311

Bilagor

SelectiveDrillDown.twbx

385 KB

 
Laddar
Salesforce Help | Article