<?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: Frequency of observation by descending order in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/669063#M200663</link>
    <description>You can add data set options to any data set. &lt;BR /&gt;This adds a where filter to your summary so only records with 2 or more counts are displayed.&lt;BR /&gt;&lt;BR /&gt;proc freq data=df;&lt;BR /&gt;table Players*Clubs / out=counts (where = (counts &amp;gt;=2));&lt;BR /&gt;run;</description>
    <pubDate>Tue, 14 Jul 2020 02:26:45 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-07-14T02:26:45Z</dc:date>
    <item>
      <title>Frequency of observation by descending order</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/668966#M200610</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;I would like to sort my table based on frequency od values. This is my table and code&lt;/P&gt;&lt;PRE&gt;Data df;
    Input Players $  Clubs 9-25$;
    datalines;
Ronaldo     ManUnited
Ronaldo     ManUnited
Ronaldo     RealMadrid
Suarez      Liverpool&lt;BR /&gt;Suarez      Liverpool
;
run;

proc freq data=df;
table Players*Clubs / out=counts;
run;
proc sort data=counts;
by players descending Count;
run;&lt;/PRE&gt;&lt;P&gt;I have tried this code but no result. Below is my desired output.&lt;/P&gt;&lt;PRE&gt;Players     Clubs
Ronaldo     ManUnited
Suarez      Liverpool&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 23:34:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/668966#M200610</guid>
      <dc:creator>fdb00004</dc:creator>
      <dc:date>2020-07-13T23:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency of observation by descending order</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/668974#M200616</link>
      <description>The RealMadrid line disappears? What is the logic to remove that line?</description>
      <pubDate>Mon, 13 Jul 2020 21:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/668974#M200616</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-13T21:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency of observation by descending order</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/668992#M200626</link>
      <description>&lt;P&gt;The code you show will not generate the output. Your data step will create the Clubs with only 8 characters, so the result will be "ManUnite".&lt;/P&gt;
&lt;P&gt;And correcting that the result will have 3 records.&lt;/P&gt;
&lt;PRE&gt;Players      Clubs       COUNT    PERCENT

Ronaldo    ManUnited       2         50
Ronaldo    RealMadrid      1         25
Suarez     Liverpool       1         25
&lt;/PRE&gt;
&lt;P&gt;So you have likely done more than you are showing in the code.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 21:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/668992#M200626</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-13T21:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency of observation by descending order</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/669020#M200647</link>
      <description>&lt;P&gt;&amp;nbsp;My mistake. I have edited the code. RealMadrid should not appear but I only want rows with 2 or more frequent outcome like Liverpool to appear on the table.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 23:41:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/669020#M200647</guid>
      <dc:creator>fdb00004</dc:creator>
      <dc:date>2020-07-13T23:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Frequency of observation by descending order</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/669063#M200663</link>
      <description>You can add data set options to any data set. &lt;BR /&gt;This adds a where filter to your summary so only records with 2 or more counts are displayed.&lt;BR /&gt;&lt;BR /&gt;proc freq data=df;&lt;BR /&gt;table Players*Clubs / out=counts (where = (counts &amp;gt;=2));&lt;BR /&gt;run;</description>
      <pubDate>Tue, 14 Jul 2020 02:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Frequency-of-observation-by-descending-order/m-p/669063#M200663</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-14T02:26:45Z</dc:date>
    </item>
  </channel>
</rss>

