How can I add multiple PI Date ranges into a Report?
Note: It's recommended that you understand the contents of the article How can I set up a basic PI Date Range?. before reading this article.
Multiple Date Ranges from a PI can be added into a Report. This allows direct and detailed comparison of data between two historic Data sets from your PIs.
Adding Extra Date Ranges to the Report Query
This method doesn't make any changes to the Report Layout, requiring only a second Date Range be added to the Date Range tab in your Report.
Firstly, set up your Report and Report Layout as you would normally do when creating a basic date range. This should contain at least a Code and/or Title field, and the Report Date Ranges field.
Once your Report is open, select the "Add Date Range" button in the Date Ranges tab. This adds a second panel into this tab, labelled Date Range 2.
In the screenshot above, I've added a new Date Range to our original Report, which has been set up to compare our first Date Range with data from a few years ago. Different fields can be selected between the two Date Ranges if need be.
There is no limit to the number of Date Ranges that can be added, however, too many will make your data unreadable.
Now that we've added the second Date Range, we can generate the Report:
In the screenshot above, we can see the two separate Date Ranges shown side-by-side, in the order that they were added to the Date Ranges tab. You can go a step further and use multiple Date Range Fields. Each use a separate Date Range in Reports Central which adds yet more functionality.
Using multiple date range fields in the Report Layout
Including multiple Date Ranges in your Reports will allow you to compare and present performance data across different time periods or look at different types of data in different contexts.
Firstly, open your existing Report Layout, and select your Date Range field. From the top of the screen, click the Date Range tab. In the panel labelled Date Range, select the second radio button called Only show range, and enter a value in the box.
This will force this date range field to show only data from the selected date range you have created in your Report query, for example if you have chosen 1 in this box, it will display the first Date Range.
You can add as many date range fields as you like, for example:
- Two date range fields displaying different data columns from the same date range.
- Two date range fields displaying the same columns from different date ranges.