Tableau Date Calculations

Tableau Date Calculations

Prev

Next

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.

Calculation Editor in Tableau

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

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

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.

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:

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download