<?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: Find medain for each customer from multiple rows and remerge back with raw data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Find-medain-for-each-customer-from-multiple-rows-and-remerge/m-p/601935#M174194</link>
    <description>&lt;P&gt;Do like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table tbl2 as
    select *, median(x) as median_x
    from tbl1
    group by ID;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Nov 2019 11:15:07 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-11-06T11:15:07Z</dc:date>
    <item>
      <title>Find medain for each customer from multiple rows and remerge back with raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-medain-for-each-customer-from-multiple-rows-and-remerge/m-p/601931#M174193</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I want to calculate for each customer median&amp;nbsp; of variable X and then to re-merge it with the original data set.&lt;/P&gt;
&lt;P&gt;Thank you so much&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl1;
input ID ddate x;
cards;
1 1901 15
1 1902 18
1 1903 22
1 1904 16
1 1905 35
1 1906 18
1 1907 21
2 1901 10
2 1902 15
2 1903 13
2 1904 15
2 1905 30
2 1906 30
2 1907 28
3 1901 40
3 1902 40
3 1903 40
3 1904 40
3 1905 40
3 1906 40
3 1907 40
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Nov 2019 10:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-medain-for-each-customer-from-multiple-rows-and-remerge/m-p/601931#M174193</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-11-06T10:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Find medain for each customer from multiple rows and remerge back with raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-medain-for-each-customer-from-multiple-rows-and-remerge/m-p/601935#M174194</link>
      <description>&lt;P&gt;Do like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table tbl2 as
    select *, median(x) as median_x
    from tbl1
    group by ID;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Nov 2019 11:15:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-medain-for-each-customer-from-multiple-rows-and-remerge/m-p/601935#M174194</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-06T11:15:07Z</dc:date>
    </item>
  </channel>
</rss>

