<?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 Using PROC TABULATE with conditional logic/grouping in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-TABULATE-with-conditional-logic-grouping/m-p/234642#M42916</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm (very) new to SAS and I'm trying to perform some analysis on data using (potentially) PROC TABULATE. &amp;nbsp;I'll provide a very truncated view of this data here to illustrate and try to explain:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ProductName, ProductPrice&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Product A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;&lt;P&gt;Product B &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;&lt;P&gt;Product C &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;&lt;P&gt;Product D &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;&lt;P&gt;Product E &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to display various stats by grouping&amp;nbsp;the Products into 2 groups: 1 group where the ProductPrice is less than or equal to the median and another group where the ProductPrice is greater than the median.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I able to complete the above just using PROC TABULATE? &amp;nbsp;I'm trying to work out how I compare each ProductPrice to the median (6) and put that product in one of the 2 groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
    <pubDate>Fri, 13 Nov 2015 15:43:24 GMT</pubDate>
    <dc:creator>andydcutler</dc:creator>
    <dc:date>2015-11-13T15:43:24Z</dc:date>
    <item>
      <title>Using PROC TABULATE with conditional logic/grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-TABULATE-with-conditional-logic-grouping/m-p/234642#M42916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm (very) new to SAS and I'm trying to perform some analysis on data using (potentially) PROC TABULATE. &amp;nbsp;I'll provide a very truncated view of this data here to illustrate and try to explain:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ProductName, ProductPrice&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Product A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;&lt;P&gt;Product B &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;&lt;P&gt;Product C &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;&lt;P&gt;Product D &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;&lt;P&gt;Product E &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to display various stats by grouping&amp;nbsp;the Products into 2 groups: 1 group where the ProductPrice is less than or equal to the median and another group where the ProductPrice is greater than the median.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I able to complete the above just using PROC TABULATE? &amp;nbsp;I'm trying to work out how I compare each ProductPrice to the median (6) and put that product in one of the 2 groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2015 15:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-TABULATE-with-conditional-logic-grouping/m-p/234642#M42916</guid>
      <dc:creator>andydcutler</dc:creator>
      <dc:date>2015-11-13T15:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC TABULATE with conditional logic/grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-TABULATE-with-conditional-logic-grouping/m-p/234646#M42917</link>
      <description>I don't think you can. You'll need to calculate the median externally and create a grouping variable to specify the groups. You can then use proc report/tabluate to generate your report/output.</description>
      <pubDate>Fri, 13 Nov 2015 16:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-TABULATE-with-conditional-logic-grouping/m-p/234646#M42917</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-13T16:02:26Z</dc:date>
    </item>
  </channel>
</rss>

