KNOWLEDGE BASE

How to dynamically display data from a specific date to yesterday.


Published: 25 Feb 2022
Last Modified Date: 28 Feb 2022

Question

How to dynamically display data from a specific date to yesterday.

Environment

  • Tableau Desktop

Answer

<Step1>
 1. Connect to Sample - Superstore.
     * The record is replaced by the year 2022.
 2. Drag [Sales] to Rows from Data pane. 
 3. While right-clicking , drag [Order Date] to Columns from Data pane.
 4. Select "MDY(Order Date)".

<Step2>
 5. Create new Calculated Field as following.
     Name : Select target date
     Calculation : IF  [Order Date] >= MAKEDATE(2022,2,1) AND [Order Date] < TODAY()
                          THEN [Order Date]
                          END 
 6. Drag [Select target date] to Filter Pane from Data Pane.
 7. Select "Month / Day / Year".
 8. Check the "NULL" and the box for Exclude.

Note: Specific date 2022/02/01
Since Sample -Superstore only has data up to the year 2021, the record for 2021 is replaced with 2022.
 
Did this article resolve the issue?