<?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: Understanding the RankX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4698794#M179986</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/569801" target="_blank" rel="noopener"&gt;@mp390988&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 May 2025 15:38:00 GMT</pubDate>
    <dc:creator>v-dineshya</dc:creator>
    <dc:date>2025-05-19T15:38:00Z</dc:date>
    <item>
      <title>Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4618959#M176775</link>
      <description>&lt;P&gt;I noticed when I replace the table&amp;nbsp;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(DimProduct) with&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;('DimProduct'[Colour]) inside my RankX function it yields different results. I don't quite understand. I know the ranking results are incorrect with ALL('DimProduct']) and correct with&amp;nbsp;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;('DimProduct'[Colour]) but my understanding is that&amp;nbsp;ALL('DimProduct'[Colour]) removes the filter context from the visual (i.e. the colour) but I thought ALL(DimProduct) removes all filters inlcuding colour so I would have expected them to give same results.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;U&gt;&lt;STRONG&gt;RankX with ALL(DimProduct)&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;RankX with ALL('DimProduct'[Colour])&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added a calculated column to my DimProducts table to calculate the SALES AMOUNT.&lt;BR /&gt;Here is the link to the excel file containing all the records from DimProducts with SALES AMOUNT -&amp;nbsp;&lt;A href="https://docs.google.com/spreadsheets/d/1z8sgMRzm4lUWm38kv1O6y_J82PDiyUDH/edit?usp=sharing&amp;amp;ouid=107023844763062029183&amp;amp;rtpof=true&amp;amp;sd=true" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how the rank with ALL(DimProducts) is ranking colour BLACK with SALES AMOUNT = 8,838,411.96 as 1 and then colour BLUE with SALES AMOUNT = 2,279,096.28 as 1 also. Doesn't make sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Mar 2025 23:39:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4618959#M176775</guid>
      <dc:creator>mp390988</dc:creator>
      <dc:date>2025-03-20T23:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4618960#M176776</link>
      <description>&lt;P&gt;RANKX iterates the table you provide, calculates the expression as a extra column, and ranks with that new column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With all(DimProduct) you are ranking on the entire table. With all(&lt;SPAN&gt;DimProduct[colour]) you are ranking on only a list of the distinct colours,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 23:44:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4618960#M176776</guid>
      <dc:creator>Deku</dc:creator>
      <dc:date>2025-03-20T23:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4619387#M176788</link>
      <description>&lt;P&gt;Ok so I guess the question I have is how does the ranking on the whole table work ? Because I don't get the same ranks when I try to work it out manually.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 08:05:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4619387#M176788</guid>
      <dc:creator>mp390988</dc:creator>
      <dc:date>2025-03-21T08:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4619409#M176790</link>
      <description>&lt;P&gt;Try adding each field from dimproduct into a table with sales amount. I assume you'll see a combination where blue, black, yellow, red and silver all have the same top amount.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 08:18:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4619409#M176790</guid>
      <dc:creator>Deku</dc:creator>
      <dc:date>2025-03-21T08:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4619456#M176794</link>
      <description>&lt;P&gt;Will that not be the excel file I added as a link in my original post? That excel file is the whole of DimProduct table with a calculated sales amount column right at the end.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 08:45:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4619456#M176794</guid>
      <dc:creator>mp390988</dc:creator>
      <dc:date>2025-03-21T08:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4681790#M179317</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569801" data-lia-user-login="mp390988" class="lia-mention lia-mention-user"&gt;mp390988&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Key Differences:&lt;/P&gt;
&lt;P&gt;ALL('DimProduct'[Color]):&lt;/P&gt;
&lt;P&gt;1.This removes only the filter on the [Color] column, meaning the ranking is done at the Color level.&lt;/P&gt;
&lt;P&gt;2.Other filters from the DimProduct table (e.g., size, product, etc.) remain intact if applied in the visual.&lt;/P&gt;
&lt;P&gt;3.This is what you want if you're ranking aggregated Sales Amount per Color, and it gives the correct ranks one rank per color.&lt;/P&gt;
&lt;P&gt;ALL(DimProduct):&lt;/P&gt;
&lt;P&gt;1.This removes all filters on the DimProduct table, including Color, Size, ProductKey, etc.&lt;/P&gt;
&lt;P&gt;2.As a result, you're ranking individual products (rows in the table), not aggregated color values.&lt;/P&gt;
&lt;P&gt;3.When the visual is grouped by Color, but you're ranking by a row-level context, it causes multiple products under the same color to get ranked leading to odd behavior like multiple ranks of 1.&lt;/P&gt;
&lt;P&gt;Note: You're calculating rank across all products, not across distinct colors. So even though the visual groups by Color, the rank measure is still working row-by-row behind the scenes, which is misleading in an aggregated visual.&lt;/P&gt;
&lt;P&gt;That's why:&lt;/P&gt;
&lt;P&gt;Black with $8.8M is ranked 1 (correct as a color total),&lt;/P&gt;
&lt;P&gt;But Blue, Red, Silver, etc., also get rank 1 — because the RANKX is being evaluated at the product level within those colors.&lt;/P&gt;
&lt;P&gt;Rank Sales Amount = &lt;BR /&gt;RANKX(&lt;BR /&gt;ALL('DimProduct'[Color]), &lt;BR /&gt;[Sales Amount],&lt;BR /&gt;,&lt;BR /&gt;,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;Note: This ensures you're ranking over the distinct list of colors, using their aggregated Sales Amount, which aligns with how your visual is grouped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 10:52:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4681790#M179317</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-05-06T10:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4688108#M179539</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569801" data-lia-user-login="mp390988" class="lia-mention lia-mention-user"&gt;mp390988&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 04:13:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4688108#M179539</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-05-12T04:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4694642#M179796</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/569801" target="_blank"&gt;@mp390988&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 15:28:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4694642#M179796</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-05-15T15:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the RankX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4698794#M179986</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/569801" target="_blank" rel="noopener"&gt;@mp390988&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 15:38:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-the-RankX/m-p/4698794#M179986</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-05-19T15:38:00Z</dc:date>
    </item>
  </channel>
</rss>

