<?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 Calculating a sum by Max date VA 8.5 in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/717641#M14633</link>
    <description>&lt;P&gt;This question is a little bit tricky. I'm trying to get the difference between the last head count for term one and the last head count for term two knowing that Head Count is a sum of individual registrations for that day. What this chart is doing is pulling daily enrollment. Daily enrollment increases by day and includes a sum of all individual registrations for that day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The initial solution was to use Parallel Period and attempt to rank BUT we can't rank by most recent date because the max date is different between the two so Rank shows the most recent date that applies to both terms which is incorrect and if I change rank so it has the most recent date then the head count of the 2nd term would be excluded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other solution was to use an aggregate table BUT that would only work if we don't apply drop-down filters. If we add the drop-down filters then we end up in square one.&amp;nbsp; I tried using Max in a calculate item but I keep getting errors about a boolean value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I get the latest number for term one form the chart below - the latest number for term two while having the numbers change depending on the drop down selections? I feel that there must be a logical way to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas are appreciated!&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="Screen Shot 2021-02-08 at 11.10.42 AM.png" style="width: 819px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54463i3D1FC46DED1D2B1D/image-dimensions/819x389?v=v2" width="819" height="389" role="button" title="Screen Shot 2021-02-08 at 11.10.42 AM.png" alt="Screen Shot 2021-02-08 at 11.10.42 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 16:35:09 GMT</pubDate>
    <dc:creator>rjassem1</dc:creator>
    <dc:date>2021-02-08T16:35:09Z</dc:date>
    <item>
      <title>Calculating a sum by Max date VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/717641#M14633</link>
      <description>&lt;P&gt;This question is a little bit tricky. I'm trying to get the difference between the last head count for term one and the last head count for term two knowing that Head Count is a sum of individual registrations for that day. What this chart is doing is pulling daily enrollment. Daily enrollment increases by day and includes a sum of all individual registrations for that day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The initial solution was to use Parallel Period and attempt to rank BUT we can't rank by most recent date because the max date is different between the two so Rank shows the most recent date that applies to both terms which is incorrect and if I change rank so it has the most recent date then the head count of the 2nd term would be excluded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other solution was to use an aggregate table BUT that would only work if we don't apply drop-down filters. If we add the drop-down filters then we end up in square one.&amp;nbsp; I tried using Max in a calculate item but I keep getting errors about a boolean value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I get the latest number for term one form the chart below - the latest number for term two while having the numbers change depending on the drop down selections? I feel that there must be a logical way to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas are appreciated!&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="Screen Shot 2021-02-08 at 11.10.42 AM.png" style="width: 819px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54463i3D1FC46DED1D2B1D/image-dimensions/819x389?v=v2" width="819" height="389" role="button" title="Screen Shot 2021-02-08 at 11.10.42 AM.png" alt="Screen Shot 2021-02-08 at 11.10.42 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 16:35:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/717641#M14633</guid>
      <dc:creator>rjassem1</dc:creator>
      <dc:date>2021-02-08T16:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a sum by Max date VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718045#M14637</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doing calculations with dates is really hard in VA and it is a priority for improvement. We have some features under development that should help, but I cannot promise what exactly or when.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some complicated workarounds (see &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Use-the-latest-date-in-your-VA-report/ta-p/536536" target="_self"&gt;Use the latest date in your VA report&lt;/A&gt;&amp;nbsp;) but I'm not sure if what you need to do will be possible using VA's expression syntax alone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be easiest for you to precalculate the max date for each term as part of your source table. With that value stored, you can use ParallelPeriod() or possibly RelativePeriod() to get the difference between terms. You should just be able to apply a filter to the Key Value object to show the current head count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 22:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718045#M14637</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-02-09T22:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a sum by Max date VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718667#M14646</link>
      <description>&lt;P&gt;I'm trying to think this through. The dates from the first year are fixed because it happened in the past but the dates for the 2nd year are updated daily so every day there is a new max date.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 17:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718667#M14646</guid>
      <dc:creator>rjassem1</dc:creator>
      <dc:date>2021-02-11T17:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a sum by Max date VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718669#M14647</link>
      <description>&lt;P&gt;For now, I might just do an overall aggregate and make a note that that this is an overall number and does not change using the drop-down filters.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 17:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718669#M14647</guid>
      <dc:creator>rjassem1</dc:creator>
      <dc:date>2021-02-11T17:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a sum by Max date VA 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718674#M14648</link>
      <description>&lt;P&gt;In SAS Data Studio, I believe it should be possible to calculate the max date so that it updates every time the table is updated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is not something I have a lot of firsthand experience with, but it should possible if you have the permissions to do so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 17:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-a-sum-by-Max-date-VA-8-5/m-p/718674#M14648</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2021-02-11T17:26:07Z</dc:date>
    </item>
  </channel>
</rss>

