<?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 Re: How to calculate AVERAGE, MIN, MAX for an Aggregated Periodic Measure in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650994#M13782</link>
    <description>&lt;P&gt;You are correct, that indeed seems to be the case. I did some testing and it appears that &lt;STRONG&gt;Aggregated Data Sources&lt;/STRONG&gt; support f.ex. &lt;STRONG&gt;Aggregated (simple)&lt;/STRONG&gt; and &lt;STRONG&gt;Aggregated (advanced)&lt;/STRONG&gt; operators but not the &lt;STRONG&gt;Aggregated (periodic)&lt;/STRONG&gt; operators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately I do not have another idea how to get the wanted end result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Petri&lt;/P&gt;</description>
    <pubDate>Wed, 27 May 2020 07:13:20 GMT</pubDate>
    <dc:creator>PetriRoine</dc:creator>
    <dc:date>2020-05-27T07:13:20Z</dc:date>
    <item>
      <title>How to calculate AVERAGE, MIN, MAX for an Aggregated Periodic Measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650195#M13761</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've created the following aggregated periodic measure called "Consumed":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aggregated measure.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39783iAECCDEB0DFC1F401/image-size/large?v=v2&amp;amp;px=999" role="button" title="aggregated measure.jpg" alt="aggregated measure.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I try to calculate the average of that measure, I get a message that "Nested aggregated expressions are not supported":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nested aggregated.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39786i2DDF762862F9F04A/image-size/large?v=v2&amp;amp;px=999" role="button" title="nested aggregated.jpg" alt="nested aggregated.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So - how do I calculate the AVERAGE (and the MIN and the MAX)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Barry Lewis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 16:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650195#M13761</guid>
      <dc:creator>blewsas</dc:creator>
      <dc:date>2020-05-24T16:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AVERAGE, MIN, MAX for an Aggregated Periodic Measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650341#M13762</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/277567"&gt;@blewsas&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem in your approach is that VA doesn't currently allow nested aggregated expressions i.e. aggregated operators inside aggregated operators.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VA 8.3 introduced capability to&amp;nbsp;&lt;SPAN&gt;create an&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=vacdc&amp;amp;cdcVersion=8.5&amp;amp;docsetId=vareportdata&amp;amp;docsetTarget=n1o2pvak2xw7jln13a2mxkytdmm4.htm&amp;amp;locale=en" target="_self" rel="nofollow noopener noreferrer"&gt;aggregated data source&lt;/A&gt;&amp;nbsp;which allows us to create&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;EM&gt;Consumed Avg, Consumed Min and Consumed Max&lt;/EM&gt;&lt;/FONT&gt;&amp;nbsp;without using nested aggregated operators. Although this approach has caveats like needing to define categories beforehand and possibly needing to &lt;STRONG&gt;Join&lt;/STRONG&gt; the data to others for report actions to work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="5"&gt;Create aggregated data source&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt;In the&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Data&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;pane, select a data source.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Click&amp;nbsp;&lt;STRONG&gt;Action&lt;/STRONG&gt;&amp;nbsp;icon&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;
&lt;DIV id="tinyMceEditorPetriRoine_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;, and then select&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="xisDoc-windowItem"&gt;New data from aggregation of&amp;nbsp;&lt;EM class="xisDoc-userSuppliedValue"&gt;data-source&lt;/EM&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;. The New Aggregated Data window is displayed.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Select the data items&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;EM&gt;Needed categories + Consumed, Time&lt;/EM&gt;&lt;/FONT&gt;&amp;nbsp;to add to the aggregated data source in the&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Available items&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;list.&amp;nbsp;&lt;/SPAN&gt;Then, click&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;+&amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;to move it to the&amp;nbsp;&lt;STRONG&gt;Selected items&lt;/STRONG&gt;&amp;nbsp;list.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;(Optional) Change the name of the aggregated data source in the&amp;nbsp;&lt;SPAN class="xisDoc-windowItem"&gt;Name&lt;/SPAN&gt;&amp;nbsp;field.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Click&amp;nbsp;&lt;STRONG&gt;Ok.&amp;nbsp;&lt;/STRONG&gt;The new aggregated data source is available in the&amp;nbsp;&lt;SPAN class="xisDoc-windowItem"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;pane.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;Now your new data source has a measure &lt;FONT face="courier new,courier"&gt;&lt;EM&gt;Consumed &lt;/EM&gt;&lt;/FONT&gt;of which aggregation you can define normally to be sum/avg/min/max etc...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe this approach would work for you?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Petri&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 05:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650341#M13762</guid>
      <dc:creator>PetriRoine</dc:creator>
      <dc:date>2020-05-25T05:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AVERAGE, MIN, MAX for an Aggregated Periodic Measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650462#M13770</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106261"&gt;@PetriRoine&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&amp;nbsp; I thought about that approach too, but it doesn't seem to work.&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are my data items after I created the "Consumed" item using the calculation I previously posted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blewsas_0-1590418647423.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39930iECAF065149CA65FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="blewsas_0-1590418647423.png" alt="blewsas_0-1590418647423.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, when I create a new aggregated data source from this data source, "Consumed" is not one of the available items:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blewsas_1-1590418759938.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39931iA84B22704D309BCA/image-size/large?v=v2&amp;amp;px=999" role="button" title="blewsas_1-1590418759938.png" alt="blewsas_1-1590418759938.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 15:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650462#M13770</guid>
      <dc:creator>blewsas</dc:creator>
      <dc:date>2020-05-25T15:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AVERAGE, MIN, MAX for an Aggregated Periodic Measure</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650994#M13782</link>
      <description>&lt;P&gt;You are correct, that indeed seems to be the case. I did some testing and it appears that &lt;STRONG&gt;Aggregated Data Sources&lt;/STRONG&gt; support f.ex. &lt;STRONG&gt;Aggregated (simple)&lt;/STRONG&gt; and &lt;STRONG&gt;Aggregated (advanced)&lt;/STRONG&gt; operators but not the &lt;STRONG&gt;Aggregated (periodic)&lt;/STRONG&gt; operators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately I do not have another idea how to get the wanted end result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Petri&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 07:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-calculate-AVERAGE-MIN-MAX-for-an-Aggregated-Periodic/m-p/650994#M13782</guid>
      <dc:creator>PetriRoine</dc:creator>
      <dc:date>2020-05-27T07:13:20Z</dc:date>
    </item>
  </channel>
</rss>

