If you want to compare measures at different times or by different dimensions, you can use the Filter by date parameter in the measure settings.
enableMetricDateFilterplatform setting to
true. For details, see Configure Various Features via Platform Settings.
For example, if you want to compare the number of opened opportunities in the current week and month, add the same measure twice and select a different Filter by date for each instance.
Filter Measures by Date
- Add a measure to the insight.
- In the measure section, click Filter by date.
- In the drop-down menu, select the dimension.
For details, see section Filter Measures by Date With Different Date Dimensions below.
- Select the period by which you want to filter the measure.
You can select the current and previous years, quarters, months, and weeks, or a static period (a date range).
The insight immediately displays the measure in the selected period.
- If you use the Filter by date, you cannot open the insight as a report. The Open as Report option is disabled.
- If you use Compare for a measure, the Filter by date is not available for this measure.
For more information, see Time over Time Comparison.
Filter Measures by Date with Different Date Dimensions
If your insight contains multiple measures and you want to use different date dimensions for each of them, specify a different dimension in the date filter of the measures.
The insight then displays the data filtered by the date dimensions that you specified.
In the following image, the insight shows a column chart with the number of opportunities that each sales representative created and closed in the current year.
GoodData Portal automatically selects a recommended date dimension based on the previous usage of date filters in your project. You can change the dimension at any time.
Date Filter Interactions
You can set a date filter:
- For individual measures (Filter by date) in Analytical Designer
- For the whole insight (in the top bar) in Analytical Designer
- For a dashboard in KPI Dashboards
All the date filters include:
- The period itself (B in the following image), such as last month, three years ago, and a static period (or date range).
- Date dimension (A in the following image) such as date created, date assigned, and date closed.
When multiple date filters are set, the following rules apply:
- If the date dimension is the same for all the filters, then only the filter with the highest priority applies as follows:
- Measure filter
- KPI Dashboards filter
- Insight filter
- If the date dimensions are different, then all the filters apply at the same time (the AND operator).
The insight shows the trend of how the opportunities that were created last year were gradually closed month by month:
- The measure filter is set to display opportunities that were created from January 1 to December 31, 2017 (A in the image).
- The insight filter is set to display opportunities that were closed from January 1 to August 31, 2017 (B in the image).
Since the filters have different date dimensions, the resulting insight applies both filters and shows the number of opportunities that were created and then also closed from January 1 to August 31, 2017.
The following opportunities are NOT included in the displayed data:
- Opportunity that was created in December 2016 and closed in February 2017 because this opportunity does not fit the measure filter (created in Jan 1- Dec 31, 2017)
- Opportunity that was created in July 2017 and closed in October 2017 because this opportunity does not fit the insight filter (closed in Jan 1- Aug 31, 2017)