<?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: show top n  subcategory (without filtering) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2535721#M71254</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you want to show top 5 countries depend on different&amp;nbsp;products?&lt;/P&gt;
&lt;P&gt;Ie rank for countries group by products and show top 5?&lt;/P&gt;
&lt;P&gt;If so create a measure like below and add it to visual filter and set value &amp;lt; 6.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = RANKX(ALLEXCEPT('Table','Table'[product]),CALCULATE(SUM('Table'[sales])),,DESC,Dense)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If I misunderstood your meaning, please show some sample data and expected result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 09:39:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-24T09:39:09Z</dc:date>
    <item>
      <title>show top n  subcategory (without filtering)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2524220#M70523</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question and I appreciate it if you help me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a matrix with 2 levels of category. the main category is the list of products and the subcategory is countries.&lt;/P&gt;&lt;P&gt;when drilling down to the second layer I want to not show all the countries and the value of the Measure I wrote for each of them. I want to show just the top 5 countries where the product is sold most, while these top 5 countries may differ for each product(main category).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate it if you help me.&lt;/P&gt;&lt;P&gt;just note that I don't want to filter the data based on the top 5 countries. I am trying to show the top 5 rather than filtering the whole table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 19:11:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2524220#M70523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-18T19:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: show top n  subcategory (without filtering)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2524836#M70575</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try like&lt;/P&gt;
&lt;P&gt;RANKX(all(Table[Country]), calculate(count(Table[Product]) ),,desc,dense)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Filter for &amp;lt;=5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use TOPN&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;calculate(count(Table[Product]) ,TOPN(1,all(Table[Country]),calculate(count(Table[Product]) )), values(Table[Country]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TOPN &lt;A href="https://youtu.be/QIVEFp-QiOk" target="_blank"&gt;https://youtu.be/QIVEFp-QiOk&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Rank Refer these links&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 01:25:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2524836#M70575</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-05-19T01:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: show top n  subcategory (without filtering)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2527657#M70753</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;/P&gt;&lt;P&gt;Thanks for your response. As I emphasized in my question, I don't want to filter the data based on the top n=5 countries. As I put into practice your suggestion the data will be filtered based on the top n=5&amp;nbsp; countries; however, I want just top n =5 countries be displayed and the rest not be displayed , while they are not filtered.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 21:07:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2527657#M70753</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-19T21:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: show top n  subcategory (without filtering)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2535721#M71254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you want to show top 5 countries depend on different&amp;nbsp;products?&lt;/P&gt;
&lt;P&gt;Ie rank for countries group by products and show top 5?&lt;/P&gt;
&lt;P&gt;If so create a measure like below and add it to visual filter and set value &amp;lt; 6.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = RANKX(ALLEXCEPT('Table','Table'[product]),CALCULATE(SUM('Table'[sales])),,DESC,Dense)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If I misunderstood your meaning, please show some sample data and expected result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 09:39:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2535721#M71254</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-24T09:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: show top n  subcategory (without filtering)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2537302#M71358</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;back to your table. As it is shown in your table total sale is 16240. But in your second table the total sale is filtered based on top 5 countries in each group of product.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is to not filter the data; however display the top5 countries for each product and accumulate the rest countries as "others". in another word, to show six rows for each products, 5 rows for the top 5 countries and the last row is "other countries"&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 20:40:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2537302#M71358</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-24T20:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: show top n  subcategory (without filtering)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2537528#M71371</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's not supported I'm afraid. You cannot add extra rows to the matrix because this "other" does not exist in your table.&lt;/P&gt;
&lt;P&gt;There is a way to make total and subtotal not affected by the filter, I can provide the formula if this is you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 01:58:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-top-n-subcategory-without-filtering/m-p/2537528#M71371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-25T01:58:14Z</dc:date>
    </item>
  </channel>
</rss>

