Time Series Analysis in Tableau
Chris Hui
VP, Tracked
Tableau treats date time data in a unique way:
Color based markers indicate data type:
Date time data can be provided in a date dimension format
Each dimension of the date field is split into its smallest measure
To deal with date data in this format, you can use the MAKEDATE()
function to reconstruct a singular date field
MAKEDATE()
is a date formatting function that enables reconstruction of date time objects from separate date time fields
MAKEDATE()
assumes the dates provided are valid and does not have any inbuilt validation
If you need to add a time component to your date field, you need to use MAKEDATETIME()
Time needed? = MAKEDATETIME()
MAKEDATE()
DATETRUNC()
rounds your date field to the desired specificityDATETRUNC()
returns the lowest value for each date part up to the date part specified as a date time objectDate2
- Date1
, however, the result returned is in daysDATEDIFF()
returns the amount of time between two time stamps based off the specificity provided (e.g. 'minute','hour' etc.)Bar charts
Area charts
Cumulative distributions
Line charts
Time Series Analysis in Tableau