<?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: How to display Top 10 rows in a table visual after filtering by a visual filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3256761#M120294</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can combine the top 10 logic with your filter measure. E.g.&lt;BR /&gt;&lt;BR /&gt;Demo data:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Filter measure: (just an example)&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Filter for top 10 = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;Filtered table:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;Now I will get top 3 based on ranking, but the same logic will apply for top 10.&lt;BR /&gt;&lt;BR /&gt;Dax:&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Filter top 3 = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;([Filter for top 10]=&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(Ranking),Ranking[Average metric])&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;End result:&lt;BR /&gt;&lt;img /&gt;
&lt;P&gt;&lt;BR /&gt;Summary: instead of using pre-built top filter use RANKX function combined with your filter measure. This way the filters can be applied with one measure.&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Sun, 28 May 2023 14:09:15 GMT</pubDate>
    <dc:creator>ValtteriN</dc:creator>
    <dc:date>2023-05-28T14:09:15Z</dc:date>
    <item>
      <title>How to display Top 10 rows in a table visual after filtering by a visual filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3256658#M120289</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to display Top 10 values in a table visual where:&lt;BR /&gt;(1) the rows are filtered by a visual filter with a complex measure "IncludeInTable"&lt;/P&gt;&lt;P&gt;(2) and then display the top 10 rows from that filtered set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I'm trying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The problem is that it's doing the reverse. The table is first applying the Top N filter and then applying the visual filter for IncludeInTable. As a result, only those rows in the top 10 rows for which IncludeInTable evaluates to 1 are being displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I achieve the desired result? Your help is most appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nandan&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 08:26:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3256658#M120289</guid>
      <dc:creator>nandanu</dc:creator>
      <dc:date>2023-05-28T08:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to display Top 10 rows in a table visual after filtering by a visual filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3256761#M120294</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can combine the top 10 logic with your filter measure. E.g.&lt;BR /&gt;&lt;BR /&gt;Demo data:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Filter measure: (just an example)&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Filter for top 10 = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Average metric]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;Filtered table:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;Now I will get top 3 based on ranking, but the same logic will apply for top 10.&lt;BR /&gt;&lt;BR /&gt;Dax:&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Filter top 3 = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;([Filter for top 10]=&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(Ranking),Ranking[Average metric])&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;End result:&lt;BR /&gt;&lt;img /&gt;
&lt;P&gt;&lt;BR /&gt;Summary: instead of using pre-built top filter use RANKX function combined with your filter measure. This way the filters can be applied with one measure.&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 28 May 2023 14:09:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3256761#M120294</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2023-05-28T14:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to display Top 10 rows in a table visual after filtering by a visual filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3256888#M120300</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help with this. I had tried the ranking approach but the requirements are slightly different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My filtered dataset is something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I displayTop 10 Lost Policies in one table visual, Top 10 Bound Policies in another table, Top 10 Incomplete Policies in another etc?&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 18:13:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3256888#M120300</guid>
      <dc:creator>nandanu</dc:creator>
      <dc:date>2023-05-28T18:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to display Top 10 rows in a table visual after filtering by a visual filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3257050#M120313</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343431" data-lia-user-login="ValtteriN" class="lia-mention lia-mention-user"&gt;ValtteriN&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your suggestion lead me to the solution. I modified my Ranking measure to wrap the RankX inside a calculate which runs the ranking over a filter that only includes either "Lost", or "Bound" or "Quoted" etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 00:41:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-display-Top-10-rows-in-a-table-visual-after-filtering-by/m-p/3257050#M120313</guid>
      <dc:creator>nandanu</dc:creator>
      <dc:date>2023-05-29T00:41:56Z</dc:date>
    </item>
  </channel>
</rss>

