Javatpoint Logo
Javatpoint Logo

Tableau Date Calculations

Tableau can provide a large number of inbuilt functions such as dates. Dates are one of the critical fields which are extensively used in most of the data analysis.

You can manipulate the simple date such as adding or subtracting days from a date. Also, you can create complex expressions that include dates.

Here are the steps to create a calculation field and use date functions in it.

How to create a calculated field

  • After connecting to a data source such as sample superstore.
  • Then go to the Analysis menu.
  • And click on the 'Create Calculated Field' as shown in the below image.
Tableau Date Calculations

Calculation Editor in Tableau

The above process opens a calculation editor that lists all the functions available in Tableau.

Tableau Date Calculations

You can change the dropdown value and only see the related functions to date, shown in the below image:

Tableau Date Calculations

Create a Formula

If you want to find out the Sales volume along with the difference in the date of sales in months from 15/06/2015 to 15/02/2015, create the formula as shown in the below image.

Tableau Date Calculations

Using the Calculated Field

To see the created field in graphical representation, you can drag Month and date_diff field into the Rows shelf and drag the Sales field to the Columns shelf. Also, drag the ship Date with months.

The below screenshot shows the Sales volume along with the difference in the date of sales:

Tableau Date Calculations





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA