<?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: Max value by group, but keep all rows and columns in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Max-value-by-group-but-keep-all-rows-and-columns/m-p/599486#M16510</link>
    <description>&lt;P&gt;Yes, this worked great. Thanks!&lt;/P&gt;</description>
    <pubDate>Sat, 26 Oct 2019 00:42:14 GMT</pubDate>
    <dc:creator>bkq32</dc:creator>
    <dc:date>2019-10-26T00:42:14Z</dc:date>
    <item>
      <title>Max value by group, but keep all rows and columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Max-value-by-group-but-keep-all-rows-and-columns/m-p/599483#M16508</link>
      <description>&lt;PRE&gt;data have;&lt;BR /&gt;input tract_or_block tract $4. tract_per_white tract_per_black tract_per_hisp ses;&lt;BR /&gt;cards;&lt;BR /&gt;100 100 0.67 0.1 0.2 1.8&lt;BR /&gt;1001 100 . . . 1.5&lt;BR /&gt;1002 100 . . . 1.4&lt;BR /&gt;200 200 0.2 0.2 0.2 1.1&lt;BR /&gt;2001 200 . . . 1.2&lt;BR /&gt;2002 200 . . . 1.3&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;I'm trying fill the missing values with the non-missing values by TRACT without getting rid of any rows or columns. I've tried the following code but can't figure out how to keep all the variables and records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have noprint nway;
 class TRACT
 var tract_per:;
 output out=want (drop= _TYPE_ _FREQ_) max= ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Oct 2019 00:23:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Max-value-by-group-but-keep-all-rows-and-columns/m-p/599483#M16508</guid>
      <dc:creator>bkq32</dc:creator>
      <dc:date>2019-10-26T00:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Max value by group, but keep all rows and columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Max-value-by-group-but-keep-all-rows-and-columns/m-p/599485#M16509</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/288620"&gt;@bkq32&lt;/a&gt;&amp;nbsp; &amp;nbsp;Your input data structure looks like a classic sample for LOCF logic as opposed to summary and merge.Am i right in my understanding?If yes,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input tract_or_block tract $4. tract_per_white tract_per_black tract_per_hisp ses;
cards;
100 100 0.67 0.1 0.2 1.8
1001 100 . . . 1.5
1002 100 . . . 1.4
200 200 0.2 0.2 0.2 1.1
2001 200 . . . 1.2
2002 200 . . . 1.3
;
run;


data want;
update have(obs=0) have;
by tract;
output;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Oct 2019 00:37:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Max-value-by-group-but-keep-all-rows-and-columns/m-p/599485#M16509</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-10-26T00:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Max value by group, but keep all rows and columns</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Max-value-by-group-but-keep-all-rows-and-columns/m-p/599486#M16510</link>
      <description>&lt;P&gt;Yes, this worked great. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 00:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Max-value-by-group-but-keep-all-rows-and-columns/m-p/599486#M16510</guid>
      <dc:creator>bkq32</dc:creator>
      <dc:date>2019-10-26T00:42:14Z</dc:date>
    </item>
  </channel>
</rss>

