<?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 for Main Category then furthermore 3 sub-categories based on % in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-for-Main-Category-then-furthermore-3-sub-categories/m-p/3560011#M137187</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank = 
SWITCH (
    TRUE (),
    ISINSCOPE ( 'unique keys'[ASO Name] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[ASO Name], 'unique keys'[Branch], 'unique keys'[Zone], 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ('Sales data'[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( 'unique keys'[Branch] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[Branch], 'unique keys'[Zone], 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ('Sales data'[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( 'unique keys'[Zone] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[Zone], 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ( 'Sales data'[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( 'unique keys'[Region] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ( 'Sales data'[Sales Ach] ) ), DESC )
        )
)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&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;Neeko Tang&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.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2023 02:09:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-11-30T02:09:38Z</dc:date>
    <item>
      <title>Ranking for Main Category then furthermore 3 sub-categories based on %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-for-Main-Category-then-furthermore-3-sub-categories/m-p/3556643#M136934</link>
      <description>&lt;P&gt;Dear Sirs &amp;amp; Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a DAX measure that can calculate&amp;nbsp;Ranking for Main Category then furthermore 3 sub-categories based on %.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Necessary Reference Files and expected results is attached below link (Excel and pbix):&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1XOUWo-EyXJVcT1_6LPCWgc38pn0dkUnP/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1XOUWo-EyXJVcT1_6LPCWgc38pn0dkUnP/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLD ISSUE:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/291628" target="_self"&gt;&lt;SPAN class=""&gt;Jihwan_Kim&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;(The Super User of community) have solve the issue before and give solution but now a little bit change in design of dashboared therefore the below DAX measure is not work properly &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;(when i used old below give DAX measure with&amp;nbsp;New parameter command in Modeling Tab by filtered&amp;nbsp;Region, Zone, Branhes and Area Sales Offier seperattarly (Pic attached) then Dax measure missed some rankings in Area sales officer and branches but region and zone is OK, i try to fix it but i no idea why this happen.)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&amp;nbsp; ... please guide me how to solve hte issue:&lt;/P&gt;&lt;P&gt;Previous issue link:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-for-Main-Category-then-for-furthermore-4-sub-category/m-p/3555655#M136851" target="_blank" rel="noopener"&gt;Solved: RANKX for Main Category then for furthermore 4 sub... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;Rank =
SWITCH (
    TRUE (),
    ISINSCOPE ( ASO[ASO Name] ),
        RANK (
            SKIP,
            ALL ( ASO[ASO Name], ASO[Branch], ASO[Zone], ASO[Region] ),
            ORDERBY ( CALCULATE ( SUM ( ASO[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( ASO[Branch] ),
        RANK (
            SKIP,
            ALL ( ASO[Branch], ASO[Zone], ASO[Region] ),
            ORDERBY ( CALCULATE ( SUM ( ASO[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( ASO[Zone] ),
        RANK (
            SKIP,
            ALL ( ASO[Zone], ASO[Region] ),
            ORDERBY ( CALCULATE ( SUM ( ASO[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( ASO[Region] ),
        RANK (
            SKIP,
            ALL ( ASO[Region] ),
            ORDERBY ( CALCULATE ( SUM ( ASO[Sales Ach] ) ), DESC )
        )
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Necessary Reference Files and expected results is attached below link (Excel and pbix):&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1XOUWo-EyXJVcT1_6LPCWgc38pn0dkUnP/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1XOUWo-EyXJVcT1_6LPCWgc38pn0dkUnP/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;@&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/291628" target="_self"&gt;&lt;SPAN class=""&gt;Jihwan_Kim&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19851" target="_self"&gt;&lt;SPAN class=""&gt;Ashish_Mathur&amp;nbsp;&amp;nbsp;@&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/148838" target="_self"&gt;amitchandak&lt;/A&gt;&lt;/P&gt;&lt;P&gt;@&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;FreemanZ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:22:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-for-Main-Category-then-furthermore-3-sub-categories/m-p/3556643#M136934</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-28T14:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking for Main Category then furthermore 3 sub-categories based on %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-for-Main-Category-then-furthermore-3-sub-categories/m-p/3560011#M137187</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403667" data-lia-user-login="123abc" class="lia-mention lia-mention-user"&gt;123abc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank = 
SWITCH (
    TRUE (),
    ISINSCOPE ( 'unique keys'[ASO Name] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[ASO Name], 'unique keys'[Branch], 'unique keys'[Zone], 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ('Sales data'[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( 'unique keys'[Branch] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[Branch], 'unique keys'[Zone], 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ('Sales data'[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( 'unique keys'[Zone] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[Zone], 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ( 'Sales data'[Sales Ach] ) ), DESC )
        ),
    ISINSCOPE ( 'unique keys'[Region] ),
        RANK (
            SKIP,
            ALL ( 'unique keys'[Region] ),
            ORDERBY ( CALCULATE ( SUM ( 'Sales data'[Sales Ach] ) ), DESC )
        )
)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&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;Neeko Tang&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.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 02:09:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-for-Main-Category-then-furthermore-3-sub-categories/m-p/3560011#M137187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-30T02:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking for Main Category then furthermore 3 sub-categories based on %</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-for-Main-Category-then-furthermore-3-sub-categories/m-p/3560738#M137245</link>
      <description>&lt;P&gt;Thank YOu Very Mcuh, Its work in great manner. May God Bless You Amin.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 10:30:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ranking-for-Main-Category-then-furthermore-3-sub-categories/m-p/3560738#M137245</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-30T10:30:49Z</dc:date>
    </item>
  </channel>
</rss>

