Create Start Date and End Date Parameters in Tableau
- In the Data window, click the drop-down arrow at the top right of Dimensions, and then select Create> Parameter.
- In the Create Parameter dialog box, name the parameter. In the example workbook, the parameter is named Start Date.
- Under Data Type, select Date & time.
- Under Allowable values, select Range.
- Click Set from Field and select the date field. In the example workbook, the date field is named Order Date.
- Click OK.
- Right-click the Start Date parameter and then select Show Parameter Control.
- Repeat steps 1-7 to create the End Date parameter.
Step 2: Create a Date Range Calculation
- Right-click Order Date in the Dimensions pane and then select Create > Calculated Field.
- Name the calculated field Date Range, and type the following in the Formula window, and then click OK:
[Order Date] >= [Start Date] AND [Order Date] <= [End Date]
Step 3: Add Date Range to Filters
- Drag Date Range to Filters, select True, and then click OK.
- Right-click Date Range on the Filters shelf, select Apply to Worksheets, and then select All Using this Data Source.
Go to Tableau's official video below on how to do this in live action:
Comments
Post a Comment