<?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 combine rows where one row has null value in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/combine-rows-where-one-row-has-null-value/m-p/249301#M56510</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I get these on the same row to look like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Region &amp;nbsp;Vehicle &amp;nbsp;year1 &amp;nbsp;color1 &amp;nbsp; year2 &amp;nbsp;color 2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;South &amp;nbsp; impala &amp;nbsp; &amp;nbsp;2014 &amp;nbsp; &amp;nbsp;blue &amp;nbsp; &amp;nbsp;&amp;nbsp;2015 &amp;nbsp; &amp;nbsp; black&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Region &amp;nbsp;Vehicle &amp;nbsp;year1 &amp;nbsp;color1 &amp;nbsp; year2 &amp;nbsp;color 2&lt;/P&gt;
&lt;P&gt;South &amp;nbsp; impala &amp;nbsp; &amp;nbsp;2014 &amp;nbsp; blue&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;South &amp;nbsp; impala &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2015 &amp;nbsp; &amp;nbsp; black&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2016 20:39:15 GMT</pubDate>
    <dc:creator>Mattress58</dc:creator>
    <dc:date>2016-02-10T20:39:15Z</dc:date>
    <item>
      <title>combine rows where one row has null value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/combine-rows-where-one-row-has-null-value/m-p/249301#M56510</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I get these on the same row to look like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Region &amp;nbsp;Vehicle &amp;nbsp;year1 &amp;nbsp;color1 &amp;nbsp; year2 &amp;nbsp;color 2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;South &amp;nbsp; impala &amp;nbsp; &amp;nbsp;2014 &amp;nbsp; &amp;nbsp;blue &amp;nbsp; &amp;nbsp;&amp;nbsp;2015 &amp;nbsp; &amp;nbsp; black&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Region &amp;nbsp;Vehicle &amp;nbsp;year1 &amp;nbsp;color1 &amp;nbsp; year2 &amp;nbsp;color 2&lt;/P&gt;
&lt;P&gt;South &amp;nbsp; impala &amp;nbsp; &amp;nbsp;2014 &amp;nbsp; blue&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;South &amp;nbsp; impala &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2015 &amp;nbsp; &amp;nbsp; black&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 20:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/combine-rows-where-one-row-has-null-value/m-p/249301#M56510</guid>
      <dc:creator>Mattress58</dc:creator>
      <dc:date>2016-02-10T20:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: combine rows where one row has null value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/combine-rows-where-one-row-has-null-value/m-p/249309#M56511</link>
      <description>Depends on how the rest of your data set look like.&lt;BR /&gt;How did you get this layout? It looks like a transpose that went wrong.&lt;BR /&gt;I would prefer a normalized table design, which is more flexible to most reporting requirements. That would mean to transpose columns to rows, having one year, and one colour column. For your particular example it would be a quite simple use of the coalesce () function.</description>
      <pubDate>Wed, 10 Feb 2016 21:01:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/combine-rows-where-one-row-has-null-value/m-p/249309#M56511</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-10T21:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: combine rows where one row has null value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/combine-rows-where-one-row-has-null-value/m-p/249311#M56512</link>
      <description>&lt;P&gt;Here's an approach that doesn't require you to spell out all the variables you need to work with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=have;&lt;/P&gt;
&lt;P&gt;by region vehicle;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;update have (obs=0) have;&lt;/P&gt;
&lt;P&gt;by region vehicle;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 21:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/combine-rows-where-one-row-has-null-value/m-p/249311#M56512</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-02-10T21:05:11Z</dc:date>
    </item>
  </channel>
</rss>

