<?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: Top_N Report is Brokeded! :( in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Top-N-Report-is-Brokeded/m-p/472375#M24586</link>
    <description>&lt;P&gt;How is the code broken?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is not working? What code did you actually use - there are 4 programs in that link.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you have one category and two measures so you would call it twice, once for each measure. If you want a top 10 based on both you would need a different algorithm.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also try PROC RANK.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/217060"&gt;@steva&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I'm trying to use the coding for the Top_N Report located at this link:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="Top N - SAS Support" href="http://support.sas.com/kb/33/009.html" target="_blank"&gt;http://support.sas.com/kb/33/009.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the tips stated in the comments at the beginning of the program:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/*************************************************/

/* TOPNCATEGORIES.SAS */

/* Top N report for data across categories */

/* Use macro variables to customize the data */

/* source. */

/* DATA - SAS library.member for input data */

/* REPORT - column to report on */

/* MEASURE - column to measure for the report */

/* MEASUREFORMAT - specify to preserve measure */

/* format in the report (currency, for example) */

/* STAT - SUM or MEAN */

/* N - The "N" in Top N - how many to show */

 /* CATEGORY - across which category? *

/*************************************************/&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example on the SAS Support page,&lt;/P&gt;
&lt;P&gt;report = Model (of car)&lt;/P&gt;
&lt;P&gt;measure = MPG_City&lt;/P&gt;
&lt;P&gt;category = Origin&lt;/P&gt;
&lt;P&gt;Producing a Top_N Report of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Top Models by MPG_City for each region of Origin.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my data, I have three variables&lt;/P&gt;
&lt;P&gt;Location&lt;/P&gt;
&lt;P&gt;Happiness&lt;/P&gt;
&lt;P&gt;Confidence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which of these are the measure, category and report variables? I am assuming that category = location but what about my other two variables? My variables are independent variables. What I would like is a table ranking the Top 10 scores of Happiness and Confidence by Location.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jun 2018 05:11:01 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-06-22T05:11:01Z</dc:date>
    <item>
      <title>Top_N Report is Brokeded! :(</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Top-N-Report-is-Brokeded/m-p/472358#M24584</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I'm trying to use the coding for the Top_N Report located at this link:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Top N - SAS Support" href="http://support.sas.com/kb/33/009.html" target="_blank"&gt;http://support.sas.com/kb/33/009.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the tips stated in the comments at the beginning of the program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/*************************************************/

/* TOPNCATEGORIES.SAS */

/* Top N report for data across categories */

/* Use macro variables to customize the data */

/* source. */

/* DATA - SAS library.member for input data */

/* REPORT - column to report on */

/* MEASURE - column to measure for the report */

/* MEASUREFORMAT - specify to preserve measure */

/* format in the report (currency, for example) */

/* STAT - SUM or MEAN */

/* N - The "N" in Top N - how many to show */

 /* CATEGORY - across which category? *

/*************************************************/&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example on the SAS Support page,&lt;/P&gt;&lt;P&gt;report = Model (of car)&lt;/P&gt;&lt;P&gt;measure = MPG_City&lt;/P&gt;&lt;P&gt;category = Origin&lt;/P&gt;&lt;P&gt;Producing a Top_N Report of&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Top Models by MPG_City for each region of Origin.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my data, I have three variables&lt;/P&gt;&lt;P&gt;Location&lt;/P&gt;&lt;P&gt;Happiness&lt;/P&gt;&lt;P&gt;Confidence&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which of these are the measure, category and report variables? I am assuming that category = location but what about my other two variables? My variables are independent variables. What I would like is a table ranking the Top 10 scores of Happiness and Confidence by Location.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 02:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Top-N-Report-is-Brokeded/m-p/472358#M24584</guid>
      <dc:creator>steva</dc:creator>
      <dc:date>2018-06-22T02:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Top_N Report is Brokeded! :(</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Top-N-Report-is-Brokeded/m-p/472375#M24586</link>
      <description>&lt;P&gt;How is the code broken?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is not working? What code did you actually use - there are 4 programs in that link.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you have one category and two measures so you would call it twice, once for each measure. If you want a top 10 based on both you would need a different algorithm.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also try PROC RANK.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/217060"&gt;@steva&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I'm trying to use the coding for the Top_N Report located at this link:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="Top N - SAS Support" href="http://support.sas.com/kb/33/009.html" target="_blank"&gt;http://support.sas.com/kb/33/009.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the tips stated in the comments at the beginning of the program:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/*************************************************/

/* TOPNCATEGORIES.SAS */

/* Top N report for data across categories */

/* Use macro variables to customize the data */

/* source. */

/* DATA - SAS library.member for input data */

/* REPORT - column to report on */

/* MEASURE - column to measure for the report */

/* MEASUREFORMAT - specify to preserve measure */

/* format in the report (currency, for example) */

/* STAT - SUM or MEAN */

/* N - The "N" in Top N - how many to show */

 /* CATEGORY - across which category? *

/*************************************************/&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example on the SAS Support page,&lt;/P&gt;
&lt;P&gt;report = Model (of car)&lt;/P&gt;
&lt;P&gt;measure = MPG_City&lt;/P&gt;
&lt;P&gt;category = Origin&lt;/P&gt;
&lt;P&gt;Producing a Top_N Report of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Top Models by MPG_City for each region of Origin.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my data, I have three variables&lt;/P&gt;
&lt;P&gt;Location&lt;/P&gt;
&lt;P&gt;Happiness&lt;/P&gt;
&lt;P&gt;Confidence&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which of these are the measure, category and report variables? I am assuming that category = location but what about my other two variables? My variables are independent variables. What I would like is a table ranking the Top 10 scores of Happiness and Confidence by Location.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 05:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Top-N-Report-is-Brokeded/m-p/472375#M24586</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-22T05:11:01Z</dc:date>
    </item>
  </channel>
</rss>

