<?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: Dynamic Ranking of Product in Hierarchy in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2277631#M55643</link>
    <description>&lt;P&gt;Dear Charlotte,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks for this suggestion. I understand, this solution uses a calculated column. We however need the ranking to be dynamic and change with the filter context. As such, a measure would be needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a solution for a measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jan 2022 13:36:42 GMT</pubDate>
    <dc:creator>JayJay11</dc:creator>
    <dc:date>2022-01-11T13:36:42Z</dc:date>
    <item>
      <title>Dynamic Ranking of Product in Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2271583#M55323</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the first I am completely stuck with a problem in DAX. My problem is supposedly simple, but I believe the RANKX function is very hard to apply in real-world problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired end-result&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I simply want to rank 3 products in a geographical hierarchy, considering also the slicer context of the report page (geography and a date range).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both rows and columns are based on fields. Ideally, the table has just one measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ranking shall be based on the latest date selected on the sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the fact table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the geography table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The date table is just a standard calender connected via the date field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand from reading countless other posts on RANKX issues, that in the end I could generate mutiple variables in a measure and then check with ISFILTERED() the current hierarchy level. I guess the issue that I have, is how to calculate the ranking on an aggregated level, like here Subregion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone provide a solution pattern for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 12:17:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2271583#M55323</guid>
      <dc:creator>JayJay11</dc:creator>
      <dc:date>2022-01-07T12:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking of Product in Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2271796#M55338</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350131" data-lia-user-login="JayJay11" class="lia-mention lia-mention-user"&gt;JayJay11&lt;/a&gt;&amp;nbsp; provide sample data first&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:24:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2271796#M55338</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-01-07T14:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking of Product in Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2271841#M55343</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;here is some sample data, does that suffice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;ISO_Country&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;7.153871417&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;4.791841636&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;8.671030065&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;0.252021849&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;7.39999411&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;8.051734496&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;7.503697651&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;7.239210549&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;1.123777987&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;SW&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;7.806173907&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;SW&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;3.857131311&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;SW&lt;/TD&gt;&lt;TD&gt;01.12.2021&lt;/TD&gt;&lt;TD&gt;1.251952541&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;4.609087907&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;2.179643813&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;9.386766622&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;2.530506259&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;8.964522569&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;4.387980849&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;0.810266905&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;7.841674418&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;1.120149594&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;SW&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;1.099291771&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;SW&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;4.258235797&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;SW&lt;/TD&gt;&lt;TD&gt;01.09.2021&lt;/TD&gt;&lt;TD&gt;4.891234175&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Country_ISO&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Subregion&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Region&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;Switzerland&lt;/TD&gt;&lt;TD&gt;Western Europe&lt;/TD&gt;&lt;TD&gt;Europe&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DE&lt;/TD&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;TD&gt;Western Europe&lt;/TD&gt;&lt;TD&gt;Europe&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;Norway&lt;/TD&gt;&lt;TD&gt;Northern Europe&lt;/TD&gt;&lt;TD&gt;Europe&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SW&lt;/TD&gt;&lt;TD&gt;Sweden&lt;/TD&gt;&lt;TD&gt;Northern Europe&lt;/TD&gt;&lt;TD&gt;Europe&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:58:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2271841#M55343</guid>
      <dc:creator>JayJay11</dc:creator>
      <dc:date>2022-01-07T14:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking of Product in Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2274173#M55425</link>
      <description>&lt;P&gt;No one? Is this actually unsolvable with DAX?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jan 2022 18:31:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2274173#M55425</guid>
      <dc:creator>JayJay11</dc:creator>
      <dc:date>2022-01-09T18:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking of Product in Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2277056#M55600</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350131" data-lia-user-login="JayJay11" class="lia-mention lia-mention-user"&gt;JayJay11&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try the following methods.&lt;/P&gt;
&lt;P&gt;New column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank =
RANKX (
    FILTER (
        'Fact',
        [Country_ISO] = EARLIER ( 'Fact'[Country_ISO] )
            &amp;amp;&amp;amp; [Date] = EARLIER ( 'Fact'[Date] )
    ),
    [Value],
    ,
    DESC
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the output you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Charlotte Zhang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 08:52:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2277056#M55600</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-01-11T08:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking of Product in Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2277631#M55643</link>
      <description>&lt;P&gt;Dear Charlotte,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks for this suggestion. I understand, this solution uses a calculated column. We however need the ranking to be dynamic and change with the filter context. As such, a measure would be needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a solution for a measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 13:36:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2277631#M55643</guid>
      <dc:creator>JayJay11</dc:creator>
      <dc:date>2022-01-11T13:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Ranking of Product in Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2278609#M55684</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350131" data-lia-user-login="JayJay11" class="lia-mention lia-mention-user"&gt;JayJay11&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank Measure =
RANKX (
    FILTER (
        ALL ( 'Fact' ),
        [Country_ISO] = MAX ( 'Fact'[Country_ISO] )
            &amp;amp;&amp;amp; [Date] = MAX ( 'Fact'[Date] )
    ),
    CALCULATE ( SUM ( 'Fact'[Value] ) ),
    ,
)
&lt;/LI-CODE&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;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 02:15:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Ranking-of-Product-in-Hierarchy/m-p/2278609#M55684</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-01-12T02:15:31Z</dc:date>
    </item>
  </channel>
</rss>

