<?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 CASE Question in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CASE-Question/m-p/38007#M4639</link>
    <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
I would like to be able to return value in stat_val column when stat_name = i_otalktim and value in stat_val when stat_name = i_owraptim&lt;BR /&gt;
&lt;BR /&gt;
How can this be done?&lt;BR /&gt;
&lt;BR /&gt;
stat_name           stat_val&lt;BR /&gt;
&lt;BR /&gt;
i_otalktim          100&lt;BR /&gt;
i_otalktim          500      &lt;BR /&gt;
i_owraptim          300          &lt;BR /&gt;
i_owraptim          200&lt;BR /&gt;
&lt;BR /&gt;
I would like the output to look like  &lt;BR /&gt;
&lt;BR /&gt;
TotTalk  TotWrap&lt;BR /&gt;
                                     &lt;BR /&gt;
  600          500 &lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: fredbell&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: fredbell

Message was edited by: fredbell</description>
    <pubDate>Sat, 19 Jun 2010 15:38:41 GMT</pubDate>
    <dc:creator>fredbell</dc:creator>
    <dc:date>2010-06-19T15:38:41Z</dc:date>
    <item>
      <title>CASE Question</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CASE-Question/m-p/38007#M4639</link>
      <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
I would like to be able to return value in stat_val column when stat_name = i_otalktim and value in stat_val when stat_name = i_owraptim&lt;BR /&gt;
&lt;BR /&gt;
How can this be done?&lt;BR /&gt;
&lt;BR /&gt;
stat_name           stat_val&lt;BR /&gt;
&lt;BR /&gt;
i_otalktim          100&lt;BR /&gt;
i_otalktim          500      &lt;BR /&gt;
i_owraptim          300          &lt;BR /&gt;
i_owraptim          200&lt;BR /&gt;
&lt;BR /&gt;
I would like the output to look like  &lt;BR /&gt;
&lt;BR /&gt;
TotTalk  TotWrap&lt;BR /&gt;
                                     &lt;BR /&gt;
  600          500 &lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: fredbell&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: fredbell

Message was edited by: fredbell</description>
      <pubDate>Sat, 19 Jun 2010 15:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CASE-Question/m-p/38007#M4639</guid>
      <dc:creator>fredbell</dc:creator>
      <dc:date>2010-06-19T15:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: CASE Question</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/CASE-Question/m-p/38008#M4640</link>
      <description>If you want to do this without writing code, it's probably going to be a two-step process:&lt;BR /&gt;
&lt;BR /&gt;
1. Summarize the data by stat_name and whatever other group columns you need (Rep_ID, Region, whatever).&lt;BR /&gt;
2. Use a Split Columns task on the resulting data to turn two rows into one row with separate columns for Talk and Wrap.&lt;BR /&gt;
&lt;BR /&gt;
You could also write some DATA step code to do both of these things at once with first./last. processing. You would need a PROC SORT initially to order the data by your grouping columns and stat_name. Someone else might post some sample code here, or you can browse through the following examples with first./last. processing to get you started:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/24/745.html" target="_blank"&gt;http://support.sas.com/kb/24/745.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/?qt=contenttype:%22Sample%22+&amp;amp;qp=url:/kb/&amp;amp;la=en&amp;amp;qm=3&amp;amp;ct=53030&amp;amp;col=suppprd" target="_blank"&gt;http://support.sas.com/kb/?qt=contenttype:%22Sample%22+&amp;amp;qp=url:/kb/&amp;amp;la=en&amp;amp;qm=3&amp;amp;ct=53030&amp;amp;col=suppprd&lt;/A&gt;</description>
      <pubDate>Mon, 21 Jun 2010 14:09:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/CASE-Question/m-p/38008#M4640</guid>
      <dc:creator>RichardH_sas</dc:creator>
      <dc:date>2010-06-21T14:09:37Z</dc:date>
    </item>
  </channel>
</rss>

