<?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: Rank Tie Issue in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85684#M8182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Right now I have a dataset unqiue by CL_ID AND DEA_ID.&amp;nbsp; The table consists of&amp;nbsp; CL_ID DEA_ID MIN_DOS SUM_BILL_AMT&amp;nbsp; I am ranking DOS by CL_ID in order to know the order the doctors were visited.&amp;nbsp; My issue is when the DOS are the same for different DEA_ID I am getting ties.&amp;nbsp; I need a way in SAS Enterprise guide to assign these tied values a different value.&amp;nbsp; Is there a way to rank under some given conditions?&amp;nbsp; While I consider myself a heavy EG user, I cannot convert this to code speak :-).&amp;nbsp; Does that clear some things up?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 May 2013 15:36:07 GMT</pubDate>
    <dc:creator>sasspan</dc:creator>
    <dc:date>2013-05-24T15:36:07Z</dc:date>
    <item>
      <title>Rank Tie Issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85682#M8180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to rank claimant's doctors in the order they received prescriptions from them.&amp;nbsp; Some claims have fills from different doctors on the same day.&amp;nbsp; This forces the rank to tie.&amp;nbsp; Example:&amp;nbsp; Patient A fills a prescription from Doctor A and B on the same day, and doctor C on the following day.&amp;nbsp; My rank would give 1.5, 1.5, and 2 respectively.&amp;nbsp; I would like to add an additional requirement to the rank such as how much they spent with the doctor in order to achieve 1, 2, and 3.&amp;nbsp; What I need to know is what number doctor this is for them in order of dates of service, when dates of service tie, I want the higher total spend doctor going last.&amp;nbsp; All of this needs to happen without affecting the other ranks.&amp;nbsp; So if I have several doctors with ranks 1, 2, 3.5 3.5, 4, 5.&amp;nbsp; I need this to show up as 1, 2, 3 ,4 ,5, 6 based off the billed amount on the tied doctors. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for rambling, rough question to ask via a forum.&amp;nbsp; Hopefully, one of you can make sense of what I'm saying.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 15:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85682#M8180</guid>
      <dc:creator>sasspan</dc:creator>
      <dc:date>2013-05-24T15:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Tie Issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85683#M8181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question makes sense (sort of), but you'll need to convert your requirements to tech speak &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;P&gt;&lt;BR /&gt;What does your data look like and what's your issue in terms of SAS.&amp;nbsp; How are you assigning the ranks currently would help in determining how to change them as well. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 15:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85683#M8181</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-05-24T15:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Tie Issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85684#M8182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Right now I have a dataset unqiue by CL_ID AND DEA_ID.&amp;nbsp; The table consists of&amp;nbsp; CL_ID DEA_ID MIN_DOS SUM_BILL_AMT&amp;nbsp; I am ranking DOS by CL_ID in order to know the order the doctors were visited.&amp;nbsp; My issue is when the DOS are the same for different DEA_ID I am getting ties.&amp;nbsp; I need a way in SAS Enterprise guide to assign these tied values a different value.&amp;nbsp; Is there a way to rank under some given conditions?&amp;nbsp; While I consider myself a heavy EG user, I cannot convert this to code speak :-).&amp;nbsp; Does that clear some things up?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 15:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85684#M8182</guid>
      <dc:creator>sasspan</dc:creator>
      <dc:date>2013-05-24T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Tie Issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85685#M8183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming that you're looking to avoid writing code for this step, so I'll suggest some non-code approaches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may be able to do the entire thing in Query Builder, if you have EG 5.1&amp;nbsp; (or even if you don't).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In EG 5.1, you can use subqueries to compare values in data records to aggregated columns (sums and averages, for example).&amp;nbsp; Lots of detail in this paper:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings12/292-2012.pdf" title="http://support.sas.com/resources/papers/proceedings12/292-2012.pdf"&gt;http://support.sas.com/resources/papers/proceedings12/292-2012.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or another approach that's multiple steps:&lt;/P&gt;&lt;P&gt;- Create a query that SUMs all of the bill amounts, grouped by CL_ID (your doctors).&lt;/P&gt;&lt;P&gt;- Create a numbered ranking of CL_ID by this value.&lt;/P&gt;&lt;P&gt;- Join that ranking back with the original detail data&lt;/P&gt;&lt;P&gt;- Use that second ranking field as a sort/rank value for your tie-breaker cases when multiple docs are visited on a single day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 16:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85685#M8183</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-05-24T16:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Tie Issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85686#M8184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This combined with a case statement on SUBSTR(PUT(RANK_DOS,...................... should get me there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 17:32:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rank-Tie-Issue/m-p/85686#M8184</guid>
      <dc:creator>sasspan</dc:creator>
      <dc:date>2013-05-24T17:32:09Z</dc:date>
    </item>
  </channel>
</rss>

