<?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: Getting RANKX to rank parent only in matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-RANKX-to-rank-parent-only-in-matrix/m-p/3401814#M128472</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="513227" data-lia-user-login="Moonc" class="lia-mention lia-mention-user"&gt;Moonc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I create a sample to have a test and I hope it could help you.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(SUM('Table'[Value]))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
VAR _SUMMARIZE =
    SUMMARIZE (
        ALL ( 'Table' ),
        'Table'[Group],
        "Sum by Group", CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Group] ) )
    )
VAR _RANK =
    ADDCOLUMNS (
        _SUMMARIZE,
        "Rank", RANKX ( _SUMMARIZE, [Sum by Group],, ASC, DENSE )
    )
RETURN
    MAXX ( FILTER ( _RANK, [Group] = MAX ( 'Table'[Group] ) ), [Rank] )&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2023 08:32:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-28T08:32:06Z</dc:date>
    <item>
      <title>Getting RANKX to rank parent only in matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-RANKX-to-rank-parent-only-in-matrix/m-p/3395883#M128095</link>
      <description>&lt;P&gt;I have a matrix with a grouping and a subgrouping and then a measure in values that is summing. I have a measure that ranks both the Grouping and the Subgrouping independently of each other&lt;/P&gt;&lt;P&gt;Example:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://imgur.com/crq9cxw" target="_blank"&gt;https://imgur.com/crq9cxw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have this logic working fine, no issues&lt;/P&gt;&lt;P&gt;I want to figure out how to give the rank of the top level group to the values in the sub group. It seems like whenever I rank just the top level group, the ranks for the subgroups just repeat 1.&lt;/P&gt;&lt;P&gt;Example:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://imgur.com/MCyMCiZ" target="_blank"&gt;https://imgur.com/MCyMCiZ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 00:45:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-RANKX-to-rank-parent-only-in-matrix/m-p/3395883#M128095</guid>
      <dc:creator>Moonc</dc:creator>
      <dc:date>2023-08-24T00:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting RANKX to rank parent only in matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-RANKX-to-rank-parent-only-in-matrix/m-p/3395954#M128096</link>
      <description>&lt;P&gt;Added clarity. If I just do a RANKX for the main grouping (A/B/C) and put it in the matrix, I get this:&amp;nbsp;&lt;A href="https://imgur.com/pDYfFDD" target="_blank"&gt;https://imgur.com/pDYfFDD&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this scenario, I want the 1s to be the rank of their parent.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 01:51:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-RANKX-to-rank-parent-only-in-matrix/m-p/3395954#M128096</guid>
      <dc:creator>Moonc</dc:creator>
      <dc:date>2023-08-24T01:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting RANKX to rank parent only in matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-RANKX-to-rank-parent-only-in-matrix/m-p/3401814#M128472</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="513227" data-lia-user-login="Moonc" class="lia-mention lia-mention-user"&gt;Moonc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I create a sample to have a test and I hope it could help you.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(SUM('Table'[Value]))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Rank = 
VAR _SUMMARIZE =
    SUMMARIZE (
        ALL ( 'Table' ),
        'Table'[Group],
        "Sum by Group", CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Group] ) )
    )
VAR _RANK =
    ADDCOLUMNS (
        _SUMMARIZE,
        "Rank", RANKX ( _SUMMARIZE, [Sum by Group],, ASC, DENSE )
    )
RETURN
    MAXX ( FILTER ( _RANK, [Group] = MAX ( 'Table'[Group] ) ), [Rank] )&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 08:32:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-RANKX-to-rank-parent-only-in-matrix/m-p/3401814#M128472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-28T08:32:06Z</dc:date>
    </item>
  </channel>
</rss>

