<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to compute percent change from previous day for a measure in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-compute-percent-change-from-previous-day-for-a-measure/m-p/303116#M5549</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;in VA 7.3 I'm looking at a table of web session data where each row is indicated by a session date, a unique session ID, and a dummy (1,0) variable called clicks (See also attached screenshot). I would like to create a line chart where for each day the percent of change from the previous day for the number of clicks&amp;nbsp; (in my case the sum of clicks)&amp;nbsp;is displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have experimented with the Aggregated Measures feature &amp;nbsp;in Explorer (i.e., the RelativePeriod Periodic operator), but when I create such an aggregated measure and use the line plot visualization, I get only missing values. So, I'm not sure if it is possible using periodic operators for daily values. The User's Guide documentation lists conditions under which that operator returns missing values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="xis-noteGenText"&gt;&amp;nbsp;Note: &lt;/SPAN&gt;Periodic operators return a missing value in the following scenarios:&lt;/P&gt;&lt;DIV class="xis-listUnordered"&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Data does not exist for the specified time period.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The date data item for the period calculation does not match the date data item in the visualization or report object. You must use the same date data item or a duplicate data item that is based on the same data item.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The interval for the operator is smaller than the interval of the date format in the visualization or report object (for example, if your interval is by month, but the date format is Year).&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;For operators that use inner and outer intervals, the inner interval is larger than the outer interval.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The inferred interval is by week of the year or by an interval smaller than a day.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The inferred interval is by day for any operator that has an offset other than 0.&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Is there a workaround solution to use calculated items or aggregated measures to get what I want? Or am I doing something wrong and misinterpret the documentation?&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Thanks in advance for any insides or suggestions&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Best regards,&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;sahrens98&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;BTW, if you need to reproduce the simulated data from the screenshot, you may use this SAS&amp;nbsp;code and then upload the resulting SAS table to LASR:&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tmp;
 do session_id=1 to 10000;

   factor=int(ranuni(2)*700);
   session_date=date()-factor;
   if ranuni(1)&amp;gt;0.9 then click=1; else click=0;

 output;
 end;

 format session_date date9.;

 drop factor;
run;

proc sort data=tmp; by session_date;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13036iA658511CE2EE3C91/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Screenshot.PNG" title="Screenshot.PNG" /&gt;</description>
    <pubDate>Fri, 07 Oct 2016 07:19:31 GMT</pubDate>
    <dc:creator>sahrens98</dc:creator>
    <dc:date>2016-10-07T07:19:31Z</dc:date>
    <item>
      <title>How to compute percent change from previous day for a measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-compute-percent-change-from-previous-day-for-a-measure/m-p/303116#M5549</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;in VA 7.3 I'm looking at a table of web session data where each row is indicated by a session date, a unique session ID, and a dummy (1,0) variable called clicks (See also attached screenshot). I would like to create a line chart where for each day the percent of change from the previous day for the number of clicks&amp;nbsp; (in my case the sum of clicks)&amp;nbsp;is displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have experimented with the Aggregated Measures feature &amp;nbsp;in Explorer (i.e., the RelativePeriod Periodic operator), but when I create such an aggregated measure and use the line plot visualization, I get only missing values. So, I'm not sure if it is possible using periodic operators for daily values. The User's Guide documentation lists conditions under which that operator returns missing values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="xis-noteGenText"&gt;&amp;nbsp;Note: &lt;/SPAN&gt;Periodic operators return a missing value in the following scenarios:&lt;/P&gt;&lt;DIV class="xis-listUnordered"&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Data does not exist for the specified time period.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The date data item for the period calculation does not match the date data item in the visualization or report object. You must use the same date data item or a duplicate data item that is based on the same data item.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The interval for the operator is smaller than the interval of the date format in the visualization or report object (for example, if your interval is by month, but the date format is Year).&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;For operators that use inner and outer intervals, the inner interval is larger than the outer interval.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The inferred interval is by week of the year or by an interval smaller than a day.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="xis-item"&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;The inferred interval is by day for any operator that has an offset other than 0.&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Is there a workaround solution to use calculated items or aggregated measures to get what I want? Or am I doing something wrong and misinterpret the documentation?&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Thanks in advance for any insides or suggestions&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;Best regards,&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;sahrens98&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;BTW, if you need to reproduce the simulated data from the screenshot, you may use this SAS&amp;nbsp;code and then upload the resulting SAS table to LASR:&lt;/DIV&gt;&lt;DIV class="xis-paraSimpleFirst"&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tmp;
 do session_id=1 to 10000;

   factor=int(ranuni(2)*700);
   session_date=date()-factor;
   if ranuni(1)&amp;gt;0.9 then click=1; else click=0;

 output;
 end;

 format session_date date9.;

 drop factor;
run;

proc sort data=tmp; by session_date;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13036iA658511CE2EE3C91/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Screenshot.PNG" title="Screenshot.PNG" /&gt;</description>
      <pubDate>Fri, 07 Oct 2016 07:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-compute-percent-change-from-previous-day-for-a-measure/m-p/303116#M5549</guid>
      <dc:creator>sahrens98</dc:creator>
      <dc:date>2016-10-07T07:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute percent change from previous day for a measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-compute-percent-change-from-previous-day-for-a-measure/m-p/304100#M5590</link>
      <description>&lt;P&gt;&lt;SPAN&gt;sahrens98&lt;/SPAN&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="color: rgb(31, 73, 125);"&gt;&lt;FONT face="Calibri" size="3"&gt;You are correct. % change from previous day is not possible in VA.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Periodic Operators do NOT work on Daily data EXCEPT for Period To Date function.&lt;/P&gt;
&lt;P&gt;The SAS VA Product Managers are aware of this feature request from customers and the hope is to have this supported in a future release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Ted Stolarczyk, SAS Customer Loyalty team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 14:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-compute-percent-change-from-previous-day-for-a-measure/m-p/304100#M5590</guid>
      <dc:creator>TedStolarczyk</dc:creator>
      <dc:date>2016-10-12T14:46:53Z</dc:date>
    </item>
  </channel>
</rss>

