<?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 pick up more than 1 max values in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111862#M4216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm ... not really a Graph question, but here is one way to do it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sample;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input id x;&lt;BR /&gt;datalines;&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 2&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 2&lt;BR /&gt;369 2&lt;BR /&gt;369 3&lt;BR /&gt;369 3&lt;BR /&gt;361 1&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table sample as&lt;BR /&gt;select sample.*, max(x) as group_max&lt;BR /&gt;from sample&lt;BR /&gt;group by id;&lt;BR /&gt;quit; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sample (drop=group_max); set sample;&lt;BR /&gt;if x=group_max then xmax=x;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2012 18:13:53 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2012-07-19T18:13:53Z</dc:date>
    <item>
      <title>how to pick up more than 1 max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111861#M4215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All, how to pick up more than 1 max values in a column and flag them in another column?&amp;nbsp; see attached code.&amp;nbsp; thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 17:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111861#M4215</guid>
      <dc:creator>John70</dc:creator>
      <dc:date>2012-07-19T17:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to pick up more than 1 max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111862#M4216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm ... not really a Graph question, but here is one way to do it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sample;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input id x;&lt;BR /&gt;datalines;&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 2&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 2&lt;BR /&gt;369 2&lt;BR /&gt;369 3&lt;BR /&gt;369 3&lt;BR /&gt;361 1&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table sample as&lt;BR /&gt;select sample.*, max(x) as group_max&lt;BR /&gt;from sample&lt;BR /&gt;group by id;&lt;BR /&gt;quit; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sample (drop=group_max); set sample;&lt;BR /&gt;if x=group_max then xmax=x;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 18:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111862#M4216</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2012-07-19T18:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to pick up more than 1 max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111863#M4217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... another SQL idea ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;create table sample as&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;select *,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;case&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; when x eq max(x) then max(x)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; else .&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;end as xmax&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;from sample&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;group by id;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 18:39:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111863#M4217</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-07-19T18:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to pick up more than 1 max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111864#M4218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The more the merrier:&lt;/P&gt;&lt;P&gt;data sample;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input id x;&lt;BR /&gt;datalines;&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 2&lt;BR /&gt;18&amp;nbsp; 1&lt;BR /&gt;18&amp;nbsp; 2&lt;BR /&gt;369 2&lt;BR /&gt;369 3&lt;BR /&gt;369 3&lt;BR /&gt;361 1&lt;BR /&gt;;&lt;BR /&gt;proc sort ;&lt;BR /&gt;by id descending&amp;nbsp; x;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want ;&lt;BR /&gt;&amp;nbsp; retain xmax;&lt;BR /&gt;&amp;nbsp; set sample;&lt;BR /&gt;&amp;nbsp; by id;&lt;BR /&gt;&amp;nbsp; xmax=ifn(first.id,x,xmax);&lt;BR /&gt;&amp;nbsp; xmax=ifn(x=xmax,xmax,.);&lt;BR /&gt;proc print; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 19:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111864#M4218</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-19T19:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to pick up more than 1 max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111865#M4219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks All&amp;nbsp; !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 20:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-pick-up-more-than-1-max-values/m-p/111865#M4219</guid>
      <dc:creator>John70</dc:creator>
      <dc:date>2012-07-19T20:08:45Z</dc:date>
    </item>
  </channel>
</rss>

