<?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: Using TOP N filter with a measure that ranks upper level of hiearchy ? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2838262#M90632</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;I think the scenario is different than you assume. I shared a picture above&lt;BR /&gt;Expecting your help. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 03:20:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-13T03:20:09Z</dc:date>
    <item>
      <title>Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2837692#M90588</link>
      <description>&lt;P&gt;Hello Everyone,&lt;BR /&gt;&lt;BR /&gt;Suppose we have a table and subcategory names, and let's say a measure [total sales] and in the subcategory name filter&lt;/P&gt;&lt;P&gt;we have TOP N filter and a measure in it and it's ranking in ascending order.&lt;BR /&gt;&lt;BR /&gt;They want to keep subcategory names and the measure in the table [total sales] and they want to change the TOP N filter (measure) to rank in CATEGORY level...&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;first question, is it possible ? because I have a measure&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&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;HASONEVALUE&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[CategoryName]),&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;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; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[CategoryName], 'Table'[CategoryName] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [total sales] , , &lt;/SPAN&gt;&lt;SPAN&gt;DESC&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; )&lt;BR /&gt;&lt;BR /&gt;and it's ranking WHEN I use only category name field and [total sales] measure in the table.&lt;BR /&gt;because they want to keep subcategory field... I think just because of that ? I can't bring the result for Category&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;because we have subcategory field in the measure...&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;IF It's possible, please help me out....&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 19:37:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2837692#M90588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-12T19:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2837992#M90615</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , You have options like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RANKX (&lt;BR /&gt;ALL('Table'[CategoryName], 'Table'[SubCategoryName] ),&lt;BR /&gt;[total sales] , , DESC&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RANKX (&lt;BR /&gt;filter(ALL('Table'[CategoryName], 'Table'[SubCategoryName] ),'Table'[CategoryName] = max('Table'[CategoryName]) ), &lt;BR /&gt;[total sales] , , DESC&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also refer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IsInScope - Switch Rank at different levels: &lt;A href="https://youtu.be/kh0gezKICEM" target="_blank"&gt;https://youtu.be/kh0gezKICEM &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/" target="_blank"&gt;https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 01:33:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2837992#M90615</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-10-13T01:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2838256#M90631</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 03:18:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2838256#M90631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-13T03:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2838262#M90632</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;I think the scenario is different than you assume. I shared a picture above&lt;BR /&gt;Expecting your help. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 03:20:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2838262#M90632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-13T03:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2838266#M90633</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , Can you share some example in table format, not able to get it. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check if these two can help&lt;/P&gt;
&lt;P&gt;Power BI Rank Across dimension tables: &lt;A href="https://youtu.be/X59qp5gfQoA" target="_blank"&gt;https://youtu.be/X59qp5gfQoA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 column top N = CALCULATE([Net], TOPN(10, SUMMARIZE(ALLSELECTED('Item'), 'Item'[Brand], 'Item'[Category]), [Net],DESC),VALUES('Item'[Brand]), VALUES('Item'[Category]) )&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 03:22:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2838266#M90633</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-10-13T03:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2839870#M90713</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Category and Subcategory are coming from different tables and there is no like nested hiearchy but&amp;nbsp;&lt;BR /&gt;when you have subcategory in the table it shows what category are in right.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Unfortunately I can't share a sample data but I can tell anything if you have any questions. Your solution above It's great but it's working for nested hiearchy. I believe we are so close to solve this issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please don't hesitate to ask any questions and finalize this issue maybe it will help others because this is a bit specific.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 14:01:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2839870#M90713</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-13T14:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2840961#M90784</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , Have you tried this &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI Rank Across dimension tables: &lt;A href="https://youtu.be/X59qp5gfQoA" target="_blank" rel="nofollow noopener noreferrer"&gt;https://youtu.be/X59qp5gfQoA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rankx(summarize(allselected(Fact), Dim1[Sub Category], Dim2[Category]), Dim2[Category] = max(Dim2[Category]) , [measure],,desc, dense)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rankx(summarize(allselected(Fact), Dim1[Sub Category], Dim2[Category]), Dim1[Sub Category] = max(Dim1[Sub Category]) , [measure],,desc, dense)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 02:03:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2840961#M90784</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-10-14T02:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOP N filter with a measure that ranks upper level of hiearchy ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2846825#M91107</link>
      <description>&lt;P&gt;It looks clean and neat but I didn't work on my situation. Thanks anyway.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 14:40:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-TOP-N-filter-with-a-measure-that-ranks-upper-level-of/m-p/2846825#M91107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-17T14:40:23Z</dc:date>
    </item>
  </channel>
</rss>

