<?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: Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4728308#M181127</link>
    <description>&lt;P&gt;You need to remove the filters from the ticket id column,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Top Traveler Rank = 

VAR SelectedN = [Top N Selection Value]

VAR TravelerRank =
    RANKX(
        ALL(Travelers),
        CALCULATE([Total Amount], REMOVEFILTERS( Data[Ticket Number] )),
        ,
        DESC,
        DENSE
    )

RETURN
    TravelerRank&lt;/LI-CODE&gt;
&lt;P&gt;You'd need to do the same thing in the Is Top Traveller measure, and then add [Is Top Traveller] to the detail table as a filter, to only show when the value is 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2025 08:49:04 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2025-06-11T08:49:04Z</dc:date>
    <item>
      <title>Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4727488#M181097</link>
      <description>&lt;P&gt;&lt;A title="PBIX" href="https://drive.google.com/drive/folders/1B4J-i9eTyTEmBX-c_AZd1OlyzR9gby4W" target="_self"&gt;https://drive.google.com/drive/folders/1B4J-i9eTyTEmBX-c_AZd1OlyzR9gby4W&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Power BI Community,&lt;/P&gt;&lt;P&gt;I am facing a very persistent issue with a Top N report that seems to defy the normal behavior of DAX.&lt;/P&gt;&lt;P&gt;My Goal:&lt;BR /&gt;I need a report with two table visuals and a slicer for 'N'.&lt;BR /&gt;1. Table A should list the Top N travelers and their total spend.&lt;BR /&gt;2. Table B should automatically show the detailed transactions for ONLY that Top N group.&lt;/P&gt;&lt;P&gt;What I Did:&lt;BR /&gt;I have built a perfect data model from scratch with a clean data sample.&lt;BR /&gt;- A unique `Travelers` dimension table (the "1" side).&lt;BR /&gt;- A `Data` fact table (the "many" side).&lt;BR /&gt;- A correct 1-to-many, single-direction relationship.&lt;BR /&gt;- Two DAX measures:&lt;BR /&gt;- `Is Top Traveler`: Uses RANKX to identify the Top N (returns 1 or 0).&lt;BR /&gt;- `Top Traveler Spend`: Uses TOPN/KEEPFILTERS to calculate spend for only the Top N (returns BLANK for others).&lt;/P&gt;&lt;P&gt;How the Report is Built:&lt;BR /&gt;- Table A is filtered by `[Is Top Traveler] = 1`. This works perfectly.&lt;BR /&gt;- Table B is filtered by `[Top Traveler Spend]` is not blank. This is the part that fails.&lt;/P&gt;&lt;P&gt;The Problem:&lt;BR /&gt;In Table B, the rows do not filter. It continues to show all travelers. However, the grand total at the bottom of the table &amp;nbsp;is correct and shows the sum for only the Top N travelers.&lt;/P&gt;&lt;P&gt;What We've Checked:&lt;BR /&gt;- Interactive filtering (manually clicking a name in Table A) works, so the relationship is correct.&lt;BR /&gt;- Visual interactions are set to "Filter".&lt;BR /&gt;- "Show items with no data" is turned off.&lt;BR /&gt;- We have tried this in a brand new file, and the problem persists.&lt;/P&gt;&lt;P&gt;Request:&lt;BR /&gt;I uploaded the PBIX file in a Google drive and shared the link above. Can someone please help ?&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 15:46:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4727488#M181097</guid>
      <dc:creator>shabeercp659</dc:creator>
      <dc:date>2025-06-10T15:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4727494#M181098</link>
      <description>&lt;P&gt;You can post a link to the PBIX on Google Drive, OneDrive or similar.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 15:38:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4727494#M181098</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-06-10T15:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4727508#M181099</link>
      <description>&lt;P&gt;I have uploaded in a google drive and the link is now pasted in the original post&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 15:47:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4727508#M181099</guid>
      <dc:creator>shabeercp659</dc:creator>
      <dc:date>2025-06-10T15:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4728308#M181127</link>
      <description>&lt;P&gt;You need to remove the filters from the ticket id column,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Top Traveler Rank = 

VAR SelectedN = [Top N Selection Value]

VAR TravelerRank =
    RANKX(
        ALL(Travelers),
        CALCULATE([Total Amount], REMOVEFILTERS( Data[Ticket Number] )),
        ,
        DESC,
        DENSE
    )

RETURN
    TravelerRank&lt;/LI-CODE&gt;
&lt;P&gt;You'd need to do the same thing in the Is Top Traveller measure, and then add [Is Top Traveller] to the detail table as a filter, to only show when the value is 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 08:49:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4728308#M181127</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-06-11T08:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4733035#M181298</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="454339" data-lia-user-login="shabeercp659" class="lia-mention lia-mention-user"&gt;shabeercp659&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your prompt response&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="454339" data-lia-user-login="shabeercp659" class="lia-mention lia-mention-user"&gt;shabeercp659&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to check if you had the opportunity to review the information provided by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;, Please feel free to contact us if you have any further questions. If my response has addressed your query, please "&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;"&amp;nbsp;so other members can easily find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Best Regards,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Lakshmi Narayana&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 07:29:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4733035#M181298</guid>
      <dc:creator>v-lgarikapat</dc:creator>
      <dc:date>2025-06-16T07:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Detail Table Won't Filter Automatically for Top N, Even When Grand Total is Correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4733623#M181326</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;. This was super helpful!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 13:17:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Detail-Table-Won-t-Filter-Automatically-for-Top-N-Even-When/m-p/4733623#M181326</guid>
      <dc:creator>shabeercp659</dc:creator>
      <dc:date>2025-06-16T13:17:04Z</dc:date>
    </item>
  </channel>
</rss>

