<?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: Removing Ranking Duplicates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3943928#M153284</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- firstly you need to include all columns from your visual in the ranking, this is what is causing your duplication, secondly I would suggest putting the filtering on the visual and taking it out of the ranking. Please try the code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RANKX (ALLSELECTED('Table1'[SubCat], 'Table1'[Group]),[Totalvols],,DESC)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you find you still need the filtering, you can use the ALLSELECTED from my code, rather than the ALL from yours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works, please accept this as the solution, if it does not, please supply some sample data for me to test.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 12:38:53 GMT</pubDate>
    <dc:creator>mark_endicott</dc:creator>
    <dc:date>2024-05-23T12:38:53Z</dc:date>
    <item>
      <title>Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3943401#M153279</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a duplicate ranking issue. At an overall level, it's fine, however bringing in multiple columns creates duplicate rankings.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see overall is fine, but group 1 has multiple 12's. I want unique rankings for each category based on it's volume. This is my formula:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Rank = &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Table1'&lt;/SPAN&gt;&lt;SPAN&gt;[SubCat]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Table1'&lt;/SPAN&gt;&lt;SPAN&gt;[SubCat]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;() &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;'Table1'&lt;/SPAN&gt;&lt;SPAN&gt;[SubCat]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"UNTAGGED"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[Totalvols]&lt;/SPAN&gt;&lt;SPAN&gt;,,&lt;/SPAN&gt;&lt;SPAN&gt;DESC&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;I've gone to places like Chat GPT which ended up telling me to get help elsewhere.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 May 2024 10:55:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3943401#M153279</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-23T10:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3943928#M153284</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- firstly you need to include all columns from your visual in the ranking, this is what is causing your duplication, secondly I would suggest putting the filtering on the visual and taking it out of the ranking. Please try the code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RANKX (ALLSELECTED('Table1'[SubCat], 'Table1'[Group]),[Totalvols],,DESC)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you find you still need the filtering, you can use the ALLSELECTED from my code, rather than the ALL from yours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works, please accept this as the solution, if it does not, please supply some sample data for me to test.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 12:38:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3943928#M153284</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-05-23T12:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3943973#M153287</link>
      <description>&lt;P&gt;Sadly this is now ranking across all columns rather ranking for each individual column. I will try and provide sample data, but need to remove sensitive data first.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 12:53:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3943973#M153287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-23T12:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3947793#M153359</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- Sorry for the late response, I have been travelling a lot the last 2 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I misread your challenge the first time, so my code was not going to work for you, sorry about that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having seen your screenshot, I can see why you have duplicate rankings. In group 1 you have 3 [Totalvols] of 89, 3 [Totalvols] of 117 and 3 visible 153's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These will all be producing duplicate ranks because they have the same value. If you want them to have different ranks, you need to provide another measure to break the ties.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 13:46:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3947793#M153359</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-05-24T13:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954076#M153498</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, create a Index in PowerQuery.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then click Apply&amp;amp;Close. &lt;BR /&gt;Create a calculated column, and treat the Index you just created as a secondary sort, which must be uniquely identified and cannot have duplicate values. Otherwise, when your sort has the same value and the sub-sort value is the same, the rank will be the same. Here is my preview:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = ROWNUMBER(ORDERBY('Table'[Totalvols],DESC,'Table'[Index],ASC))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yohua%40microsoft.com%7Ce1106bfabecb4734a5cc08dc2305bc51%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638423754744679080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=24%2BceC5sFd3n3%2FhFDYILWFcNjCwVClBD%2BPBsSLVfJGk%3D&amp;amp;reserved=0" target="_blank" rel="noopener nofollow noreferrer"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yongkang Hua&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 07:37:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954076#M153498</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-28T07:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954207#M153501</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- I dont agree with this solution, though you are correct, it removes the duplicates. In terms of ranking, the duplicates are legitamately there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a business user was to ask what the criteria was for separating the items that have 100 as a total volume, the answer would be "random chance" and that's not acceptable. It could lead to a poor decision being made by an organisation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 08:23:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954207#M153501</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-05-28T08:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954553#M153507</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;These are not the volumes, this is the output of your code. There are very few rows that have the same volumes&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 10:00:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954553#M153507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-28T10:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Ranking Duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954837#M153518</link>
      <description>&lt;P&gt;I see, then we still need some sample data to understand why you are getting duplicates.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 11:15:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Removing-Ranking-Duplicates/m-p/3954837#M153518</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-05-28T11:15:12Z</dc:date>
    </item>
  </channel>
</rss>

