<?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 PROBLEMS WITH RANKX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1607816#M32285</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Enyone else experiencing probles with the RANKX?&lt;/P&gt;&lt;P&gt;I've soon browsed the entire web for a solution, but no matter what DAX I'm trying I get the same minor errors.&lt;/P&gt;&lt;P&gt;My "basic" DAX (at the moment) is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RANK - share =&lt;/P&gt;&lt;P&gt;RANKX(&lt;/P&gt;&lt;P&gt;ALLSELECTED(ORGANIZATION[STORE]) ; [SHARE] ; ; DESC ; Dense&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The purpose is to rank&amp;nbsp; stores based on share of sales of certain products.&lt;/P&gt;&lt;P&gt;[SHARE] is a meassure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No matter what I try, I get some MINOR errors in the ranking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stores are placed in correct order, but the ranking differs from time to time.&lt;/P&gt;&lt;P&gt;Sometimes no stores are ranked as #1&lt;/P&gt;&lt;P&gt;Sometimes two stores are given he same ranking allthough share is not the same&lt;/P&gt;&lt;P&gt;Sometmes it just skippes a (random) ranking&lt;/P&gt;&lt;P&gt;etc. (see picture)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any bright minds out there who can help me solve this anoying little bug?&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 08:24:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-01-19T08:24:44Z</dc:date>
    <item>
      <title>PROBLEMS WITH RANKX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1607816#M32285</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Enyone else experiencing probles with the RANKX?&lt;/P&gt;&lt;P&gt;I've soon browsed the entire web for a solution, but no matter what DAX I'm trying I get the same minor errors.&lt;/P&gt;&lt;P&gt;My "basic" DAX (at the moment) is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RANK - share =&lt;/P&gt;&lt;P&gt;RANKX(&lt;/P&gt;&lt;P&gt;ALLSELECTED(ORGANIZATION[STORE]) ; [SHARE] ; ; DESC ; Dense&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The purpose is to rank&amp;nbsp; stores based on share of sales of certain products.&lt;/P&gt;&lt;P&gt;[SHARE] is a meassure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No matter what I try, I get some MINOR errors in the ranking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stores are placed in correct order, but the ranking differs from time to time.&lt;/P&gt;&lt;P&gt;Sometimes no stores are ranked as #1&lt;/P&gt;&lt;P&gt;Sometimes two stores are given he same ranking allthough share is not the same&lt;/P&gt;&lt;P&gt;Sometmes it just skippes a (random) ranking&lt;/P&gt;&lt;P&gt;etc. (see picture)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any bright minds out there who can help me solve this anoying little bug?&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 08:24:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1607816#M32285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T08:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEMS WITH RANKX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1607859#M32288</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;RANK - share =&lt;BR /&gt;RANKX ( ALL ( ORGANIZATION ), [SHARE], ,DESC, DENSE )&lt;BR /&gt;You can refer to this&amp;nbsp;&lt;A href="https://www.wiseowl.co.uk/blog/s2469/rankx-function.htm" target="_self"&gt;link&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 08:56:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1607859#M32288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T08:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEMS WITH RANKX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1608425#M32292</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply &amp;amp; effort, but unfortunately this doesn't work either...&lt;/P&gt;&lt;P&gt;I've read the blog-post, but it just don't add up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried de-tours via both ALL and ALLSELECTED among others, but It never gets closer then 95% correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possibly it is a result of problems with the measure (SHARE) that is ranked.&lt;/P&gt;&lt;P&gt;Share is again a function of misc other measures.&lt;/P&gt;&lt;P&gt;Maybe I need to go up the entire line one more time.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 11:37:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1608425#M32292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T11:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEMS WITH RANKX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1608442#M32293</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;Can you please provide the sample data in table format so I can check?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 11:40:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1608442#M32293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T11:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROBLEMS WITH RANKX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1608557#M32296</link>
      <description>&lt;P&gt;Thanks, but I think I finally found the solution.&lt;/P&gt;&lt;P&gt;Format the SHARE as CURRENCY.&lt;/P&gt;&lt;P&gt;Ref. this article - seems to be a general DAX issue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My final solution was this:&lt;/P&gt;&lt;P&gt;RANK - share = RANKX(ORGANIZATION[STORE];CURRENCY([SHARE]);;DESC)&lt;/P&gt;&lt;P&gt;(For some reason I also had to skip the Dense to get it correct)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/blog/marco/2014/07/16/use-of-rankx-with-decimal-numbers-in-dax/" target="_blank" rel="noopener"&gt;https://www.sqlbi.com/blog/marco/2014/07/16/use-of-rankx-with-decimal-numbers-in-dax/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 12:35:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PROBLEMS-WITH-RANKX/m-p/1608557#M32296</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T12:35:06Z</dc:date>
    </item>
  </channel>
</rss>

