Date Period Analysis

Overview

The period analysis tool allows end-users the ability to quickly choose from a list of pre-set date values to filter reports. Common values include dates such as ‘today’, ‘yesterday’, and ‘this week’ to more complicated date ranges such as ‘last month to date’ and ‘last fiscal quarter’. Additionally, end-users are given the ability to easily compare two different date ranges against each other.

Implementation

When a true date field is selected as a filter, specific date related relationships become available. To allow the end-user to perform runtime period analysis, select ‘Period Analysis’ as the relation.

relationship
Figure 1: Creating a Period Analysis date filter

Only true date fields can be used with this feature. If you have an numeric date field, you can convert to a true date field with a calculation.

At runtime, the end-user will be given full command of filtering and/or comparing dates in the report.

runtime1

The most basic use of this tool is to simply filter the data based on a common date. Aside from the manual date selection of ‘Equal to’ or ‘In the range’, the relation dropdown has many built-in options for common date values, as displayed below:

relation dropdown

Comparing Dates

Comparison options include Prior Period, Prior Year, and Custom Range (there is also a fourth option called Prior Year Adjusted, which can be added by following these instructions here). If a user has selected data from this month, and chooses to compare to the previous period, all non-Dimension numeric fields will display two columns.

One column contains the data for this month (current period) and the other column will hold data for last month (prior period). The same can be expected for previous year and a custom range.

runtime columns

URL Web Parameters

Like all other report options, the period analysis feature can be invoked by passing URL parameters to the report. This is required when emailing reports in the Messaging and Scheduled Task utility or running reports within a dashboard application.

Available Parameters

  • compareOn: Set the option to indicate which comparison type will be used. If not comparing dates, this parameter may be omitted. Available values:
    • period: Prior Period
    • year: Prior Year
    • custom: Custom Range
    • prior-adjusted: Prior Year Adjusted
  • rls_RXXX: Set the date relationship value. Available values:
    • EQ: equal to
    • RG: in the range
    • GE: Greater than or equal to
    • GT: Greater than
    • LE: Less than or equal to
    • LT: Less than
    • D1: is today
    • D2: is yesterday
    • W1: is this week
    • W2: is this week to date
    • W3: is last week
    • W4: is last week-to-date
    • M1: is this month
    • M2: is this month-to-date
    • M3: is last month
    • M4: is last month-to-date
    • Q1: is this (fiscal) quarter
    • Q5: is this quarter
    • Q2: is this (fiscal) quarter-to-date
    • Q6: is this quarter-to-date
    • Q3: is last (fiscal) quarter
    • Q7: is last quarter
    • Q4: is last (fiscal) quarter-to-date
    • Q8: is last quarter-to-date
    • Y1: is this (fiscal) year
    • Z1: is this year
    • Y2: is this (fiscal) year-to-date
    • Z2: is this year-to-date
    • Y3: is last (fiscal) year
    • Z3: is last year
    • Y4: is last (fiscal) year-to-date
    • Z4: is last year-to-date
  • RXXX: Set the manual date value if the relationship above does not dynamically set the date already. Available values: any valid date value.
    • Note: If the relationship is set to RG (in the range), two RXXX values will be needed; one for the start date value and another for the end date value.
  • compVal1/compVal2: Required only if using the custom comparison. Set the custom date range values for the start date (compVal1) and end date (compVal2). Available values: Any valid date.

Examples

DICTIONARY.R00010s?run=2&compareOn=period&rls_R001=D1

Display data from today compared to yesterday

DICTIONARY.R00010s?run=2&compareOn=period&rls_R001=RG&R001=01/15/2023&R001=01/18/2023

Display data from a date range of 01/15/2023 – 01/18/2023 compared to 01/11/2023 – 01/14/2023.

DICTIONARY.R00010s?run=2&compareOn=year&rls_R001=Y1

Display data from this year compared to last year.

DICTIONARY.R00010s?run=2&compareOn=year&rls_R001=RG&R001=01/15/2023&R001=01/18/2023

Display data from a date range of 01/15/2023 – 01/18/2018 compared to the same date range one year ago, which is 01/15/2023 – 01/18/2023.

DICTIONARY.R00010s?run=2&compareOn=custom&rls_R001=M2&compVal1=01/20/2023&compVal2=01/26/2023

Display data from this month-to-date compared to 01/20/2023 – 01/26/2023.

Additional Notes

  • The heading text representing the (Current) and (Prior) columns may be changed from Admin Menu -> Dictionary Configuration -> Runtime Application Settings. Find the options for ‘Prior period column label’ and ‘Current period column label’. Recompile your application (you do not need to overwrite the HTML) to see the change.
  • Fiscal dates are determined from the ‘fiscal_month’ property in the mrcjava/WEB-INF/classes/mrc_runtime.properties file found on the m-Power server (i.e. fiscal_month=5). Tomcat needs to be restarted after the file change. This file will need to be promoted to production as well.
  • This feature only supports true date fields. If wanting to use a datetime field, you will need to have a calculation created to convert the datetime to a date only field. For example; MSSQL database: CONVERT(DATE, [FIELD_HERE]). Use the new calculation as the Filter field.
  • Period Analysis is supported in the following templates: Regular Report, Interactive Report, OLAP Pivot Table, the Interactive Report, and the Report Designer.
Updated on May 4, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support