<?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 Display Latest &amp;amp; Avg Value of a variable calculated using Aggregated Periodic Operators in Key Value in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-Latest-amp-Avg-Value-of-a-variable-calculated-using/m-p/945438#M18353</link>
    <description>&lt;P&gt;Hello SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m working on Visual Analytics on SAS Viya 3.5 with monthly customer data that looks like this:&lt;/P&gt;&lt;P&gt;Period Product Active_Customers&lt;BR /&gt;Jan2004 Loan 10&lt;BR /&gt;Feb2004 Loan 15&lt;BR /&gt;... ... ...&lt;BR /&gt;Dec2012 Loan 22&lt;BR /&gt;Jan2004 Spend 19&lt;BR /&gt;... ... ...&lt;BR /&gt;Dec2012 Spend 41&lt;BR /&gt;Jan2004 Save 19&lt;BR /&gt;... ... ...&lt;BR /&gt;Dec2012 Save 41&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’ve added a product filter (dropdown list) and a time-slider to filter by 'Period' on the dashboard.&lt;/P&gt;&lt;P&gt;I have used Aggregated Periodic Operators (specifically the Relative Period operator) to calculate the 'Difference in Active Customers' for each period relative to the previous period.&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="Relative Period Expression.PNG" style="width: 746px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100709i9CFEE77EF92922E2/image-dimensions/746x242?v=v2" width="746" height="242" role="button" title="Relative Period Expression.PNG" alt="Relative Period Expression.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to do two things:&lt;BR /&gt;1. Display the latest value of 'Difference in Active Customers' for the selected product and time range in a Key-Value.&lt;BR /&gt;2. Display the average value of the last 12 rows of 'Difference in Active Customers' in a separate Key-Value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m able to display the latest 'Difference in Active Customers' in a list table by ranking 'Period' (converted to numeric using TreatAs operator) and selecting the top 1 row. However, this approach doesn’t seem to work for Key-Value, as it shows missing values. I have attached an image for reference.&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="Dash.PNG" style="width: 608px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100710iCE6218E48D41A85B/image-dimensions/608x241?v=v2" width="608" height="241" role="button" title="Dash.PNG" alt="Dash.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For the average of the last 12 rows, I attempted to use the Avg operator on 'Difference in Active Customers' variable but received an error: "Nested Aggregated Expressions are not supported."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I correctly display these two calculated values of 'Difference in Active Customers' in a Key-Value?&lt;BR /&gt;Any suggestions on how to implement this would be greatly appreciated. Thanks in advance for your help!&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 10:13:12 GMT</pubDate>
    <dc:creator>saunvida</dc:creator>
    <dc:date>2024-09-27T10:13:12Z</dc:date>
    <item>
      <title>Display Latest &amp; Avg Value of a variable calculated using Aggregated Periodic Operators in Key Value</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-Latest-amp-Avg-Value-of-a-variable-calculated-using/m-p/945438#M18353</link>
      <description>&lt;P&gt;Hello SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m working on Visual Analytics on SAS Viya 3.5 with monthly customer data that looks like this:&lt;/P&gt;&lt;P&gt;Period Product Active_Customers&lt;BR /&gt;Jan2004 Loan 10&lt;BR /&gt;Feb2004 Loan 15&lt;BR /&gt;... ... ...&lt;BR /&gt;Dec2012 Loan 22&lt;BR /&gt;Jan2004 Spend 19&lt;BR /&gt;... ... ...&lt;BR /&gt;Dec2012 Spend 41&lt;BR /&gt;Jan2004 Save 19&lt;BR /&gt;... ... ...&lt;BR /&gt;Dec2012 Save 41&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’ve added a product filter (dropdown list) and a time-slider to filter by 'Period' on the dashboard.&lt;/P&gt;&lt;P&gt;I have used Aggregated Periodic Operators (specifically the Relative Period operator) to calculate the 'Difference in Active Customers' for each period relative to the previous period.&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="Relative Period Expression.PNG" style="width: 746px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100709i9CFEE77EF92922E2/image-dimensions/746x242?v=v2" width="746" height="242" role="button" title="Relative Period Expression.PNG" alt="Relative Period Expression.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to do two things:&lt;BR /&gt;1. Display the latest value of 'Difference in Active Customers' for the selected product and time range in a Key-Value.&lt;BR /&gt;2. Display the average value of the last 12 rows of 'Difference in Active Customers' in a separate Key-Value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m able to display the latest 'Difference in Active Customers' in a list table by ranking 'Period' (converted to numeric using TreatAs operator) and selecting the top 1 row. However, this approach doesn’t seem to work for Key-Value, as it shows missing values. I have attached an image for reference.&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="Dash.PNG" style="width: 608px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100710iCE6218E48D41A85B/image-dimensions/608x241?v=v2" width="608" height="241" role="button" title="Dash.PNG" alt="Dash.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For the average of the last 12 rows, I attempted to use the Avg operator on 'Difference in Active Customers' variable but received an error: "Nested Aggregated Expressions are not supported."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I correctly display these two calculated values of 'Difference in Active Customers' in a Key-Value?&lt;BR /&gt;Any suggestions on how to implement this would be greatly appreciated. Thanks in advance for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 10:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-Latest-amp-Avg-Value-of-a-variable-calculated-using/m-p/945438#M18353</guid>
      <dc:creator>saunvida</dc:creator>
      <dc:date>2024-09-27T10:13:12Z</dc:date>
    </item>
  </channel>
</rss>

