<?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: Ranking Task only runs only one way - ASC in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135004#M10914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end I got around it by coding 'ROW_NUMBER() (Partition by...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Dec 2014 02:34:55 GMT</pubDate>
    <dc:creator>Oscarboots</dc:creator>
    <dc:date>2014-12-07T02:34:55Z</dc:date>
    <item>
      <title>Ranking Task only runs only one way - ASC</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135001#M10911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Forum,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using SAS EG 5.1 (64 bit) on Windows 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to Rank some Order Dates &amp;amp; Customer numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've sorted the dates in the previous Query Builder &amp;amp; then added a Ranking Task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've added the 'Order Dates' to the 'Columns to rank' area of the Rank wizard &amp;amp; 'Customer Number' to the 'Rank By' area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then select 'Descending' in the 'Rank By' fields sort order &amp;amp; run the task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No matter what I do, it always sorts in Ascending order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried sorting the previous node the other way but no use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 01:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135001#M10911</guid>
      <dc:creator>Oscarboots</dc:creator>
      <dc:date>2014-12-04T01:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Task only runs only one way - ASC</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135002#M10912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone suggest any tutorials on how to use the Rank Task so I can find what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 07:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135002#M10912</guid>
      <dc:creator>Oscarboots</dc:creator>
      <dc:date>2014-12-04T07:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Task only runs only one way - ASC</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135003#M10913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Rank Data task is used to compute a rank across one or more numeric variables in the input data.&amp;nbsp; Usually you would use this to assign an ordinal rank to a quantitative variable, such as "Sales amount" or "Units Sold".&amp;nbsp; You would not use it to rank time series data (like Dates) or ID variables (like a Customer ID Number).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "Rank By" role is for grouping purposes, not for sorting.&amp;nbsp; For example, if you wanted to compute the rank for Customer Sales in each Country, Customer Sales would be the Rank variable and Country would be the Rank By.&amp;nbsp; The output would include rank output (1, 2, 3, and so on) for &lt;STRONG&gt;each value&lt;/STRONG&gt; of Country within your data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output data is not sorted by rank.&amp;nbsp; If you need the data sorted, you can feed the output data set into a Sort Data task or the Query Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what your ultimate goal is, but you might be interested in &lt;A href="http://blogs.sas.com/content/sasdummy/2008/08/29/create-a-top-n-report-in-sas/"&gt;this sample for creating a Top N report in SAS&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 12:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135003#M10913</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2014-12-04T12:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Task only runs only one way - ASC</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135004#M10914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end I got around it by coding 'ROW_NUMBER() (Partition by...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Dec 2014 02:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Ranking-Task-only-runs-only-one-way-ASC/m-p/135004#M10914</guid>
      <dc:creator>Oscarboots</dc:creator>
      <dc:date>2014-12-07T02:34:55Z</dc:date>
    </item>
  </channel>
</rss>

