<?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: Sum of Maximum values in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451691#M9834</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130667"&gt;@don_data&lt;/a&gt;&amp;nbsp;I have no clue of SAS visual analytics. Are you looking for a programming solution despite posting in visual analytics board? Or does visual analytics also has a user written facility?&lt;/P&gt;</description>
    <pubDate>Thu, 05 Apr 2018 21:05:57 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-04-05T21:05:57Z</dc:date>
    <item>
      <title>Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451670#M9832</link>
      <description>&lt;P&gt;My dataset has sales data for 3 years. For each year there are 3 records. I am interested in obtaining the sum of the maximum/ distinct values of the 3 years.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2016&lt;/TD&gt;&lt;TD&gt;19959&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2016&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;19959&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2016&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;19959&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2015&lt;/TD&gt;&lt;TD&gt;9201&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2015&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;9201&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2015&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;9201&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;306245&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;306245&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017&lt;/TD&gt;&lt;TD&gt;306245&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired Result:&amp;nbsp;19959+9201+306245 =&amp;nbsp;335405&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following&amp;nbsp;techniques to no avail:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Technique 1: Sum (by GRoup) [Max( by Group)(Sales)]&amp;nbsp;&lt;/P&gt;&lt;P&gt;This resulted in an error as we can not perform an aggregate on an aggregate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Technique 2: Duplicated sales variable and changed the default aggregate measure to MAX. Following which I ran a sum on Sales.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Achieved Result: 1006215&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know of a way I can obtain my desired result?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 20:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451670#M9832</guid>
      <dc:creator>don_data</dc:creator>
      <dc:date>2018-04-05T20:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451690#M9833</link>
      <description>&lt;P&gt;Using sub-queries can get you this result&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile datalines delimiter='09'x;
input Year	Sales;
datalines;
2016	19952
2016	19955
2016	19959
2015	9200
2015	9111
2015	9201
2017	306200
2017	306244
2017	306245
;
run;

proc sql;
create table want as 
select a.Year,a.Sales,MAX(a.Sales) as max_Group,b.SUM_MAX_Val
	from have a, (select SUM(MAX_Val) as SUM_MAX_Val
						from (select distinct MAX(Sales) as MAX_Val 
									from have 
									group by year) 
								) b
						
group by a.year
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Apr 2018 20:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451690#M9833</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-04-05T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451691#M9834</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130667"&gt;@don_data&lt;/a&gt;&amp;nbsp;I have no clue of SAS visual analytics. Are you looking for a programming solution despite posting in visual analytics board? Or does visual analytics also has a user written facility?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 21:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451691#M9834</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-04-05T21:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451698#M9835</link>
      <description>&lt;P&gt;I am looking at doing this in SAS Visual Analytics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, to my knowledge, the Visual Analytics module does not allow for proc codes.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 21:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451698#M9835</guid>
      <dc:creator>don_data</dc:creator>
      <dc:date>2018-04-05T21:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451739#M9837</link>
      <description>&lt;P&gt;Using Data Builder (Data preparation) you can use custom code. When you open a data query and start initial Design then go to &lt;STRONG&gt;CODE&lt;/STRONG&gt; tab select &lt;STRONG&gt;All Code. &lt;/STRONG&gt;There you can see a lock icon, click this to unlock the code for manual editing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 383px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19671i11133D52DEE541DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information refer to SAS Visual Analytics User Guide 7.4&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/vaug/69957/PDF/default/vaug.pdf" target="_self"&gt;click here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 01:36:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/451739#M9837</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-04-06T01:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/452131#M9853</link>
      <description>&lt;P&gt;Add a new column to your data as below then just sum that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE cellspacing="0" cellpadding="0" border="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Year&lt;/TD&gt;
&lt;TD&gt;Sales_Unique&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2016&lt;/TD&gt;
&lt;TD&gt;19959&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2016&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2016&lt;/TD&gt;
&lt;TD&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2015&lt;/TD&gt;
&lt;TD&gt;9201&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2015&lt;/TD&gt;
&lt;TD&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2015&lt;/TD&gt;
&lt;TD&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2017&lt;/TD&gt;
&lt;TD&gt;&lt;SPAN&gt;306245&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2017&lt;/TD&gt;
&lt;TD&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2017&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 22:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/452131#M9853</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-04-06T22:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/519546#M11576</link>
      <description>&lt;P&gt;Thanks SuryaKiran. However, I do not think this flexibility/ option is available&amp;nbsp;in version 8.2 of SAS VA.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 20:35:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/519546#M11576</guid>
      <dc:creator>don_data</dc:creator>
      <dc:date>2018-12-07T20:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sum of Maximum values</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/519678#M11580</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130667"&gt;@don_data&lt;/a&gt; - you can use normal SAS code outside of VA when you are preparing the data to be loaded into your VA server. The interface to build your code could be SAS Studio which comes bundled with SAS VA.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 20:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Sum-of-Maximum-values/m-p/519678#M11580</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-12-08T20:28:28Z</dc:date>
    </item>
  </channel>
</rss>

