Filtering to the Single Most Recent Date
Tableau recommends the below 4 options to filter a worksheet to the most recent single date:
Option 1
Use the Latest Date Preset feature. Unlike the additional options listed below, this option will allow for the use of the filters card to select additional dates.
Option 2
- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box that opens, enter a name for the field.
- In the formula field, create a calculated field similar to the following:
[Order Date] = {FIXED : MAX([Order Date])}
- Drag the newly created calculated field from the Measures pane to the Filter shelf.
- In the Filter dialog box that opens, select True, and then click OK.
Option 3 (if LOD calculations are not possible):
- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box that opens, enter a name for the field.
- In the formula field, create a calculated field similar to the following and click OK:
IF MAX([Order Date])=WINDOW_MAX(MAX([Order Date])) THEN 'Max Date' ELSE 'Other' END
- Drag the newly created calculated field from the Measures pane to the Filter shelf.
- In the Filter dialog box that opens, select max date, and then click OK.
Option 4
- Drag the date field (for example Order Date) from the Dimensions pane to the Filters shelf.
- In the Filter Field dialog box, select the desired discrete date part. For example, to display only the latest month, select Month / Year, and then click Next >.
- In the Filter dialog box, click the Top tab, and then select By Field.
- Under By Field, select Top and enter 1.
- Then select Order Date and Maximum from the drop-down menus and click OK.
Comments
Post a Comment