I want to visualize the unique count for a field aggregated daily and weekly per day in the same sheet. But timelion aggregation affects the entire sheet instead of just a single chart.
The expression I am using to get the daily unique count is
.es(metric='cardinality:userId').bars().title('Unique users over time')
If I change the bucket range on the right to 1d, I get the correct chart. How do I create the weekly aggregation?
There is a possibility to specify the interval used for timelion expressions by specifying
interval
as1d
or respectively1w
in thees()
function. For details, please see the docs here.In your case this should work with the following expression:
Be aware of the comment inside the docs, stating that this should not be used in favor of working with the interval picker. But probably this is a use case where it is okay to do it like this...