<?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 in a Matrix with hierarchies with data from 2 tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814376#M184103</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Use ALLSELECTED instead of ALL so the rank respects the parent level:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adhesions_Rank =&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;&lt;BR /&gt;// Rank inside Department (service) for its store&lt;BR /&gt;ISINSCOPE(A[service_label]),&lt;BR /&gt;RANKX(&lt;BR /&gt;ALLSELECTED(A[service_label]),&lt;BR /&gt;[NB_CUSTOMERS],&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;),&lt;/P&gt;&lt;P&gt;// Rank inside Store for its Region&lt;BR /&gt;ISINSCOPE(B[entity_label]),&lt;BR /&gt;RANKX(&lt;BR /&gt;ALLSELECTED(B[entity_label]),&lt;BR /&gt;[NB_CUSTOMERS],&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;),&lt;/P&gt;&lt;P&gt;// Rank inside Regions (overall)&lt;BR /&gt;ISINSCOPE(B[region_label]),&lt;BR /&gt;RANKX(&lt;BR /&gt;ALLSELECTED(B[region_label]),&lt;BR /&gt;[NB_CUSTOMERS],&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt; This way:&lt;/P&gt;&lt;P&gt;Departments rank within their store&lt;/P&gt;&lt;P&gt;Stores rank within their region&lt;/P&gt;&lt;P&gt;Regions rank globally&lt;/P&gt;</description>
    <pubDate>Tue, 02 Sep 2025 09:50:39 GMT</pubDate>
    <dc:creator>Shahid12523</dc:creator>
    <dc:date>2025-09-02T09:50:39Z</dc:date>
    <item>
      <title>RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814326#M184100</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Objective:&lt;/U&gt; Create a rank calculation in a matrix based on the number of customers.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So, with a hierarchy:&lt;/P&gt;&lt;P&gt;Region&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Store&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Department&lt;/P&gt;&lt;P&gt;We have table A, which contains the store ID, department, and number of customers.&lt;/P&gt;&lt;P&gt;We have table B, which contains the store ID, store label, and associated region label for each store ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The desired matrix would be:&lt;/P&gt;&lt;P&gt;Region (table B)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Store (table B)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Department (Table A)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SUM Number of customers (Measure)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Associated rank (Measure)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The rank should therefore be calculated for each of the hierarchies based on the number of customers.&lt;/P&gt;&lt;P&gt;At the service level, I have no problem with the calculation, but at the other levels (store and region), I do have some issues.&lt;/P&gt;&lt;P&gt;At the store level, I have a calculation, but strangely, I will have the same rank for stores with 645, 636, and 623 customers, respectively. This is illogical.&lt;/P&gt;&lt;P&gt;At the region level, I only have 1s.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Actual measure :&lt;/P&gt;&lt;P&gt;Adhesions_Rank =&lt;BR /&gt;VAR rank_region =&lt;BR /&gt;RANKX(&lt;BR /&gt;ALL(B[region_label]),&lt;BR /&gt;CALCULATE([NB_CUSTOMERS]),&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR rank_magasin =&lt;BR /&gt;RANKX(&lt;BR /&gt;ALL(B[entity_label]),&lt;BR /&gt;CALCULATE([[NB_CUSTOMERS]]),&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR rank_service =&lt;BR /&gt;RANKX(&lt;BR /&gt;ALL(A[service_label]),&lt;BR /&gt;CALCULATE([NB_CUSTOMERS]),&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;ISINSCOPE(A[service_label]), rank_service,&lt;BR /&gt;ISINSCOPE(B[entity_label]), rank_magasin,&lt;BR /&gt;ISINSCOPE(B[region_label]), rank_region&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 09:38:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814326#M184100</guid>
      <dc:creator>yassine_mendy59</dc:creator>
      <dc:date>2025-09-02T09:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814349#M184101</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="783884" data-lia-user-login="yassine_mendy59" class="lia-mention lia-mention-user"&gt;yassine_mendy59&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Adhesions_Rank =
SWITCH(
    TRUE(),
    
    -- Department level (rank within a store)
    ISINSCOPE(A[service_label]),
        RANKX(
            ALLSELECTED(A[service_label]),
            CALCULATE([NB_CUSTOMERS]),
            ,
            DESC,
            DENSE
        ),
    
    -- Store level (rank within a region)
    ISINSCOPE(B[entity_label]),
        RANKX(
            ALLSELECTED(B[entity_label]),
            CALCULATE([NB_CUSTOMERS]),
            ,
            DESC,
            DENSE
        ),
    
    -- Region level (rank across all regions)
    ISINSCOPE(B[region_label]),
        RANKX(
            ALLSELECTED(B[region_label]),
            CALCULATE([NB_CUSTOMERS]),
            ,
            DESC,
            DENSE
        )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 09:43:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814349#M184101</guid>
      <dc:creator>Poojara_D12</dc:creator>
      <dc:date>2025-09-02T09:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814367#M184102</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="783884" data-lia-user-login="yassine_mendy59" class="lia-mention lia-mention-user"&gt;yassine_mendy59&lt;/a&gt;&amp;nbsp;, Try using&lt;/P&gt;
&lt;P&gt;dax&lt;BR /&gt;Adhesions_Rank =&lt;BR /&gt;VAR rank_region =&lt;BR /&gt;RANKX(&lt;BR /&gt;ALL(B[region_label]),&lt;BR /&gt;CALCULATE(SUM(A[NB_CUSTOMERS])),&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;VAR rank_magasin =&lt;BR /&gt;RANKX(&lt;BR /&gt;ALL(B[store_label]),&lt;BR /&gt;CALCULATE(SUM(A[NB_CUSTOMERS])),&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;VAR rank_service =&lt;BR /&gt;RANKX(&lt;BR /&gt;ALL(A[department]),&lt;BR /&gt;CALCULATE(SUM(A[NB_CUSTOMERS])),&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;RETURN&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;ISINSCOPE(A[department]), rank_service,&lt;BR /&gt;ISINSCOPE(B[store_label]), rank_magasin,&lt;BR /&gt;ISINSCOPE(B[region_label]), rank_region&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 09:47:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814367#M184102</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-09-02T09:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814376#M184103</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Use ALLSELECTED instead of ALL so the rank respects the parent level:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adhesions_Rank =&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;&lt;BR /&gt;// Rank inside Department (service) for its store&lt;BR /&gt;ISINSCOPE(A[service_label]),&lt;BR /&gt;RANKX(&lt;BR /&gt;ALLSELECTED(A[service_label]),&lt;BR /&gt;[NB_CUSTOMERS],&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;),&lt;/P&gt;&lt;P&gt;// Rank inside Store for its Region&lt;BR /&gt;ISINSCOPE(B[entity_label]),&lt;BR /&gt;RANKX(&lt;BR /&gt;ALLSELECTED(B[entity_label]),&lt;BR /&gt;[NB_CUSTOMERS],&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;),&lt;/P&gt;&lt;P&gt;// Rank inside Regions (overall)&lt;BR /&gt;ISINSCOPE(B[region_label]),&lt;BR /&gt;RANKX(&lt;BR /&gt;ALLSELECTED(B[region_label]),&lt;BR /&gt;[NB_CUSTOMERS],&lt;BR /&gt;,&lt;BR /&gt;DESC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt; This way:&lt;/P&gt;&lt;P&gt;Departments rank within their store&lt;/P&gt;&lt;P&gt;Stores rank within their region&lt;/P&gt;&lt;P&gt;Regions rank globally&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 09:50:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814376#M184103</guid>
      <dc:creator>Shahid12523</dc:creator>
      <dc:date>2025-09-02T09:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814762#M184104</link>
      <description>&lt;P&gt;No changeing, always the same problem with the ranking&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 14:15:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814762#M184104</guid>
      <dc:creator>yassine_mendy59</dc:creator>
      <dc:date>2025-09-02T14:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814765#M184105</link>
      <description>&lt;P&gt;Not working either&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sad_but_relieved_face:"&gt;😥&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 14:17:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814765#M184105</guid>
      <dc:creator>yassine_mendy59</dc:creator>
      <dc:date>2025-09-02T14:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814778#M184106</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;could you share the pbix with sample data?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 14:35:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4814778#M184106</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2025-09-02T14:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4815870#M184146</link>
      <description>&lt;P&gt;My pbi is linked to GCP tables so i can't give you some data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2025 15:53:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4815870#M184146</guid>
      <dc:creator>yassine_mendy59</dc:creator>
      <dc:date>2025-09-03T15:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4816534#M184169</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="783884" data-lia-user-login="yassine_mendy59" class="lia-mention lia-mention-user"&gt;yassine_mendy59&lt;/a&gt;&amp;nbsp;please try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Rank =&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;rank_region&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Table B'&lt;/SPAN&gt;&lt;SPAN&gt;[region_label]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[NB_CUSTOMERS]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN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IV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ISINSCOPE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Table B'&lt;/SPAN&gt;&lt;SPAN&gt;[region_label]&lt;/SPAN&gt;&lt;SPAN&gt; ), &lt;/SPAN&gt;&lt;SPAN&gt;rank_region&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Sep 2025 08:55:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4816534#M184169</guid>
      <dc:creator>techies</dc:creator>
      <dc:date>2025-09-04T08:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4817936#M184207</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="783884" data-lia-user-login="yassine_mendy59" class="lia-mention lia-mention-user"&gt;yassine_mendy59&lt;/a&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for reaching out to the Microsoft fabric community forum. It looks like&amp;nbsp;your ranking expression is not evaluating a &lt;EM data-start="2806" data-end="2829"&gt;store/region-specific&lt;/EM&gt; aggregation when RANKX iterates, so several store rows end up returning the same value to RANKX. Kindly go through the responses given by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="645372" data-lia-user-login="techies" class="lia-mention lia-mention-user"&gt;techies&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;&amp;nbsp;and check if your issue can be resolved.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would also take a moment to thank&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="645372" data-lia-user-login="techies" class="lia-mention lia-mention-user"&gt;techies&lt;/a&gt;, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470368" data-lia-user-login="Gabry" class="lia-mention lia-mention-user"&gt;Gabry&lt;/a&gt;, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1265350" data-lia-user-login="Shahid12523" class="lia-mention lia-mention-user"&gt;Shahid12523&lt;/a&gt;&amp;nbsp;and &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Hammad.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 09:44:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4817936#M184207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-09-05T09:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4820434#M184264</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="783884" data-lia-user-login="yassine_mendy59" class="lia-mention lia-mention-user"&gt;yassine_mendy59&lt;/a&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If yes, you are welcome to share your workaround so that other users can benefit as well. &amp;nbsp;And if you're still looking for guidance, feel free to give us an update, we’re here for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&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;Hammad.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 17:32:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4820434#M184264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-09-08T17:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: RANKING in a Matrix with hierarchies with data from 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4825455#M184389</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="783884" data-lia-user-login="yassine_mendy59" class="lia-mention lia-mention-user"&gt;yassine_mendy59&lt;/a&gt;,&lt;BR /&gt;Hope everything’s going smoothly on your end. As we haven’t heard back from you, so I wanted to check if the issue got sorted. &lt;BR /&gt;Still stuck? No worries just drop us a message and we can jump back in on the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Hammad.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Sep 2025 13:48:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKING-in-a-Matrix-with-hierarchies-with-data-from-2-tables/m-p/4825455#M184389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-09-14T13:48:21Z</dc:date>
    </item>
  </channel>
</rss>

