Dynamic Date Granularity for Analysis

We may need to create a trend chart according to variable date granularities, such as day/week/month/quarter etc via a parameter. This can be done fairly easily through 2 steps:

- Create a parameter Select Date Grain that has options as day/week/month/quarter

- Create Date Grain as a new date dimension

DATETRUNC(Select Date Grain, Order Date)

That's it! We can use the above to create bar or line chart. Via the parameter, we will be able to analyze time series data at different granularity.

Show Missing Date Grains Dynamically

In Tableau, there is a native "Show missing dates" or "Show missing values" function, which allows us to add dates when data records are missing at those dates. This is also known as date/data densification.
4
Blog Archive
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.