Displaying Year to Date Excluding Current Month

Published: 22 Aug 2013
Last Modified Date: 20 Jan 2019


How to display year to date (YTD) data while excluding data from the current month.


Tableau Professional


The following instructions can be reviewed in the workbook attached below.
  1. Go to Analysis > Create Calculated Field.
  2. Enter a name, e.g. YTD - Exclude Last Month
  3. Enter the formula:
    DATEDIFF('month',[Order Date],Today()) > 0 AND DATEDIFF('year',[Order Date],Today())= 0
  4. Click OK.
  5. Drag this new field onto the Filter shelf and select True.
  6. Click OK.  
  7. (Optional) If there are other date range filters on the view, click the drop-down arrow for the quick filter and select Only Relevant Values
Did this article resolve the issue?