Filter options
Reading time:
Go to Dimension -> Filter
Single selection / Multi selection
If this option is enabled, you can choose only a single value from filter
If this opion is disabled, you can choose multiple values from filter.
Default value
You can set first value, last value or a specific value as default value,For the calendar type filter, you can set interval to default value, and then define the start date and the end date.
You can enter a static date or a dynamic date.
For static date, you can entre like "2024-01-01",
For dynamic date, we use moment.js (https://momentjs.com/docs/#/manipulating/)
Here some example :
Current year :
- startdate : moment().startOf('year');
- Enddate : moment().subtract('days',1).format();
Last year :
- startdate : moment().subtract(1,'year').startOf('year').format();
- Enddate : moment().subtract(1,'year').endOf('year').format();
Current month :
- startdate : moment().startOf('months'); ;
- Enddate : moment().subtract('days',1).format();
Last month :
- startdate : moment().subtract('months',1).startOf('month').format();
- Enddate : moment().subtract('months',1).endOf('month').format();
Last 10 years :
- startdate : moment().startOf('year').subtract(10, 'years');
- Enddate : moment().endOf('year').subtract(10, 'years');
A sliding year:
- Startdate : moment().subtract('Year',1);
- Enddate : moment().format();
A sliding month:
- Startdate : moment().subtract(1, 'months');
- Enddate : moment().format();
Last update: 7 October 2024
Views: 115