Dynamic time buckets (daily, weekly, monthly) in charts

When charting time series data, sometimes you want the ability to dynamically modify the granularity of time dimension, to show weekly or monthly breakdowns instead of by day.

Besides using hierarchies and drill into feature, you can use custom filters and parameters to allow the users to choose the time interval that will then update the visual with the correct bucketing granularity.

In this example we have chosen “weekly” interval which then updates our visual to show weekly aggregates.

If we choose monthly, we see the chart update to show monthly rollups.

1) Setup custom filter

2) Create custom expression for the X dimension of the visual:

concat(' ', substr(cast (trunc(([date_time]),'<<timeinterval:DD>>') as string), 1, 10)) as 'Date'

1 Like