KNOWLEDGE BASE

Filter to Last Date With Available Data


Published: 18 May 2018
Last Modified Date: 21 May 2018

Question

How to filter to the last date that had data available.

Environment

Tableau Desktop

Answer

The below steps can be reviewed in the attached sample workbook: ShowLastDateWithData.twbx.

Step 1 - Check for Null values

  1. Create a new calculated field.
  2. Using the measure we want to check for available data enter a formula similar to the following: ISNULL( [Measure] )
  3. Click OK 

Step 2 - Find Last Date

  1. Create a new calculated field.
  2. Enter the following formula referencing the above calculation: { FIXED : MAX(IF NOT [Is Sales Null] THEN [Date] END) }

Step 3 - Compare last date against all dates

  1. Create a new calculated field.
  2. Enter the following formula: [Date] = [Last Date ]
  3. Drag this field onto the filters shelf and select True.


 

Additional Information

See attached workbook for sample of steps above
Did this article resolve the issue?