A new feature built into data modules is the ability to create relative time using Fiscal calendars.
In the data module, these basic steps need to be followed to add relative time:
- Add the desired calendar as a new table.
- Associate a date column with a corresponding date field from the calendar using the date column’s lookup reference property.
- Associate a measure column with the same date field from the calendar.
Your date column will now have 18 pre-defined relative date filters available. Your measure column will now have 18 pre-defined relative date measures available.
The following example, shows how add relative time to the data module using a March 1st fiscal calendar.
To add the fiscal calendar to the data module:
- Click the Add icon at the top of the Data module pane and select Add new sources.
- Click on Team content and navigate to Calendars > Fiscal calendars.
- Select March 1 and click OK. A fiscal calendar table will be added, with March 1 as the start of the year.
To add the relative time filters to a date query item:
Navigate to the view and click More on the Date query item you want to use for relative time.
- Select Properties.
- Locate the Lookup reference property and set it to Calendar.
Expand the Date column in the hierarchy pane, and notice that new relative time filters have been added. Once you have added relative time filters to a date field, you can add them to your existing measures.
To add relative time calculations to the measures:
- Select all the measures in the data module (You can do this by holding CTRL and clicking each measure).
- In the Properties pane, set the Lookup reference property for all measures to a Date field you configured to use relative time filters.
- Save the data module.
New filters are found under Date, and calculations are found under each measure.