How to perform Date Calculations in Tableau?

In Tableau Desktop, connect to the Sample-Superstore saved data source, which comes with Tableau. Navigate to a worksheet. From the Data pane, under Dimensions, drag Order Date to the Rows shelf. On the Rows shelf, click the plus icon (+) on the YEAR(Order Date) field.

  1. In Tableau Desktop, connect to the Sample-Superstore saved data source, which comes with Tableau.
  2. Navigate to a worksheet.
  3. From the Data pane, under Dimensions, drag Order Date to the Rows shelf.
  4. On the Rows shelf, click the plus icon (+) on the YEAR(Order Date) field.
  5. On the Rows shelf, click the plus icon (+) on the QUARTER(Order Date) field to drill down to MONTH(Order Date).
  6. Select Analysis > Create Calculated Field.
  7. In the calculation editor that opens, do the following:
  • Name the calculated field, Quarter Date.
  • Enter the following formula:
  • DATETRUNC('quarter', [Order Date])
  • When finished, click OK.