{"id":8835,"date":"2018-02-09T11:08:06","date_gmt":"2018-02-09T17:08:06","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/docs\/?page_id=8835"},"modified":"2023-05-04T12:30:05","modified_gmt":"2023-05-04T17:30:05","slug":"period-analysis","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/period-analysis","title":{"rendered":"Date Period Analysis"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>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 &#8216;today&#8217;, &#8216;yesterday&#8217;, and &#8216;this week&#8217; to more complicated date ranges such as &#8216;last month to date&#8217; and &#8216;last fiscal quarter&#8217;. Additionally, end-users are given the ability to easily compare two different date ranges against each other.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Analyze Date Based Data via the Web\" width=\"643\" height=\"362\" src=\"https:\/\/www.youtube.com\/embed\/svMZWncVZAM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<p>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 &#8216;Period Analysis&#8217; as the relation.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/vue-images\/relationship.png\" alt=\"relationship\"\/><figcaption class=\"wp-element-caption\">Figure 1: Creating a Period Analysis date filter<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">Only true <strong>date<\/strong> 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.<\/p>\n\n\n\n<p>At runtime, the end-user will be given full command of filtering and\/or comparing dates in the report.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/docs\/images\/pop\/runtime1.png\" alt=\"runtime1\"\/><\/figure>\n\n\n\n<p>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 &#8216;Equal to&#8217; or &#8216;In the range&#8217;, the relation dropdown has many built-in options for common date values, as displayed below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"\/docs\/images\/pop\/relationDropdown.png\" alt=\"relation dropdown\"\/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"compare\">Comparing Dates<\/h2>\n\n\n\n<p>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<a rel=\"noopener noreferrer\" href=\"https:\/\/www.mrc-productivity.com\/techblog\/?p=10655\" target=\"_blank\"> here<\/a>). 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. <\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/docs\/images\/pop\/runtime2.png\"><img decoding=\"async\" src=\"\/docs\/images\/pop\/runtime2.png\" alt=\"runtime columns\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"webparms\">URL Web Parameters<\/h2>\n\n\n\n<p>Like all other report options, the period analysis feature can be invoked by passing URL parameters to the report. This is required when <a rel=\"noreferrer noopener\" href=\"\/docs\/knowledge-base\/working-with-the-messaging-scheduled-tasks-plug-in#email-a-report\" target=\"_blank\">emailing reports in the Messaging and Scheduled Task utility<\/a> or running reports within a <a rel=\"noreferrer noopener\" href=\"\/docs\/knowledge-base\/creating-and-customizing-dashboards\" data-type=\"ht_kb\" target=\"_blank\">dashboard<\/a> application.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Available Parameters<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>compareOn: <\/strong> Set the option to indicate which comparison type will be used. If not comparing dates, this parameter may be omitted. Available values:\n<ul class=\"wp-block-list\">\n<li>period: Prior Period<\/li>\n\n\n\n<li>year: Prior Year<\/li>\n\n\n\n<li>custom: Custom Range<\/li>\n\n\n\n<li>prior-adjusted: Prior Year Adjusted<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>rls_RXXX: <\/strong> Set the date relationship value. Available values: \n<ul class=\"wp-block-list\">\n<li><span style=\"font-size: revert; color: initial;\">EQ: equal to<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">RG: in the range<\/span>   <\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">GE: Greater than or equal to<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">GT: Greater than<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">LE: Less than or equal to<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">LT: Less tha<\/span>n<\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">D1: is today<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">D2: is yesterday<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">W1: is this week<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">W2: is this week to date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">W3: is last week<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">W4: is last week-to-da<\/span>te<\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">M1: is this month<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">M2: is this month-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">M3: is last mont<\/span>h<\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">M4: is last month-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q1: is this (fiscal) quarter<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q5: is this quarter<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q2: is this (fiscal) quarter-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q6: is this quarter-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q3: is last (fiscal) quarter<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q7: is last quarter<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q4: is last (fiscal) quarter-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Q8: is last quarter-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Y1: is this (fiscal) year<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Z1: is this year<\/span> <\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Y2: is this (fiscal) year-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Z2: is this year-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Y3: is last (fiscal) year<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Z3: is last year<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Y4: is last (fiscal) year-to-date<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Z4: is last <mark style=\"background-color:#fff\" class=\"has-inline-color\">year-to-date<\/mark><\/span><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>RXXX: <\/strong>Set the manual date value if the relationship above does not dynamically set the date already. Available values: any valid date value. \n<ul class=\"wp-block-list\">\n<li><strong>Note:&nbsp;<\/strong>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.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>compVal1\/compVal2: <\/strong> Required only if using the custom comparison. Set the custom date range values for the start date (compVal1) and end date (compVal2). <em>Available values: <\/em> Any valid date.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Examples<\/strong><\/h3>\n\n\n\n<p><span style=\"background-color: rgb(245, 245, 245); font-family: &quot;Roboto Mono&quot;, Monaco, courier, monospace; font-size: 14.4px; color: initial;\">DICTIONARY.R00010s?run=2&amp;<strong>compareOn=period&amp;rls_R001=D1<\/strong><\/span><\/p>\n\n\n\n<p>Display data from today compared to yesterday<\/p>\n\n\n\n<p><code>DICTIONARY.R00010s?run=2&amp;<strong>compareOn=period&amp;rls_R001=RG&amp;R001=01\/15\/2023&amp;R001=01\/18\/2023<\/strong><\/code><\/p>\n\n\n\n<p>Display data from a date range of 01\/15\/2023 &#8211; 01\/18\/2023 compared to 01\/11\/2023 &#8211; 01\/14\/2023. <\/p>\n\n\n\n<p><code>DICTIONARY.R00010s?run=2&amp;<strong>compareOn=year&amp;rls_R001=Y1<\/strong><\/code><\/p>\n\n\n\n<p>Display data from this year compared to last year.<\/p>\n\n\n\n<p><code>DICTIONARY.R00010s?run=2&amp;<strong>compareOn=year&amp;rls_R001=RG&amp;R001=01\/15\/2023&amp;R001=01\/18\/2023<\/strong><\/code><\/p>\n\n\n\n<p>Display data from a date range of 01\/15\/2023 &#8211; 01\/18\/2018 compared to the same date range one year ago, which is 01\/15\/2023 &#8211; 01\/18\/2023.<\/p>\n\n\n\n<p><code>DICTIONARY.R00010s?run=2&amp;<strong>compareOn=custom&amp;rls_R001=M2&amp;compVal1=01\/20\/2023&amp;compVal2=01\/26\/2023<\/strong><\/code><\/p>\n\n\n\n<p>Display data from this month-to-date compared to 01\/20\/2023 &#8211; 01\/26\/2023.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"notes\">Additional Notes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The heading text representing the (Current) and (Prior) columns may be changed from Admin Menu -> Dictionary Configuration -> Runtime Application Settings. Find the options for &#8216;Prior period column label&#8217; and &#8216;Current period column label&#8217;. Recompile your application (you do not need to overwrite the HTML) to see the change.<\/li>\n\n\n\n<li>Fiscal dates are determined from the &#8216;fiscal_month&#8217; 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.<\/li>\n\n\n\n<li>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.<\/li>\n\n\n\n<li>Period Analysis is supported in the following templates: Regular Report, Interactive Report, OLAP Pivot Table, the Interactive Report, and the Report Designer.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8216;today&#8217;, &#8216;yesterday&#8217;, and &#8216;this week&#8217; to more complicated date ranges such as &#8216;last month to date&#8217; and &#8216;last fiscal quarter&#8217;. Additionally, end-users&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[250],"ht-kb-tag":[],"class_list":["post-8835","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-report"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/8835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=8835"}],"version-history":[{"count":54,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/8835\/revisions"}],"predecessor-version":[{"id":12805,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/8835\/revisions\/12805"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=8835"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=8835"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=8835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}