<?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: Rankx function is behaving weird when used in table with extra columns and Slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4726490#M181053</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="633018" data-lia-user-login="cruncher" class="lia-mention lia-mention-user"&gt;cruncher&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try with below dax measure attaching the screenshot for your reference.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank 3 = 
RANKX(
    FILTER(
        ALLSELECTED(Sales),
        Sales[Rank Source] = "Yes"
            &amp;amp;&amp;amp; Sales[Source] IN VALUES(Sales[Source])
    ),
    CALCULATE(SUM(Sales[Sales])),
    ,
    DESC,
    DENSE
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jun 2025 05:13:47 GMT</pubDate>
    <dc:creator>v-kathullac</dc:creator>
    <dc:date>2025-06-10T05:13:47Z</dc:date>
    <item>
      <title>Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703176#M180136</link>
      <description>&lt;P&gt;Hi Experts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having a hard time understanding dax evaluation context in Rankx function. I want to rank the customers based on sales. These are the steps I have followed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step 1: Creating an Measure Sales: SUM(Sales[Sales])&lt;BR /&gt;Step 2: Add Table to visual. Add Customer Name and Sales Measure. Sort Visual by Sales.&lt;BR /&gt;Step 3: Create Customer Rank : Customer_Rank = RANKX(ALLSELECTED(Sales[Customer]),Sales[Sales_M],,DESC,Dense)&lt;BR /&gt;Step 4: Drag Customer Rank to Table visual&lt;BR /&gt;Step 5: Add visual level filter and include only Rank Source= Yes&lt;BR /&gt;Step 6: Add a single select slicer based on Source and remove blank from slicer list. Select any one source.&lt;BR /&gt;Step 7: Show the Rank by respecting both Visual level filter and Slicer.&lt;/P&gt;&lt;P&gt;Upto Step 7 everything is working fine and rank is also correct.&lt;/P&gt;&lt;P&gt;Step 8: Drag Category to Table and rank is incorrect now. I want to show Category as passive field without affecting the rank.&lt;BR /&gt;Step 9: Changed Rank calculation and context to exclude Category from Filter context.&lt;BR /&gt;Customer_Rank = RANKX(ALLSELECTED(Sales[Customer]),CALCULATE(Sales[Sales_M],REMOVEFILTERS(Sales[Categoy])),,DESC,Dense)&lt;/P&gt;&lt;P&gt;Rank is correct now&lt;/P&gt;&lt;P&gt;Step 10: Add Status to table. Now rank is incorrect again. Changed rank context again to remove Status from filter context&lt;BR /&gt;Customer_Rank = RANKX(ALLSELECTED(Sales[Customer]),CALCULATE(Sales[Sales_M],REMOVEFILTERS(Sales[Categoy],Sales[Status])),,DESC,Dense)&lt;/P&gt;&lt;P&gt;Rank is correct now&lt;/P&gt;&lt;P&gt;Step 11: Add Status to slicer. Remove Unknow from Slicer values so that it doesn't appear in slicer select list and then filter on one status.&lt;/P&gt;&lt;P&gt;Now data is filter for that status but Rank is not continuous like 1,2,3,5. It first calculated the rank and then filtered on status.&lt;/P&gt;&lt;P&gt;I want rank to respect the Status filter when applied in slicer but status should act as passive field in the visual.&lt;/P&gt;&lt;P&gt;Once Rank is correct then I need a Top N parameter where user can select Top N customers by respecting all slicers&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;Here is pbix file. &lt;A title="Rank PBIX" href="https://1drv.ms/u/c/08be67c11800d507/EaFad9Rb5MxFkjuG2OUJw60BuKDu59dp5qcsUZaebYYH7w?e=5Hki5J" target="_self"&gt;PBIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Cruncher&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 09:19:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703176#M180136</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-05-22T09:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703308#M180140</link>
      <description>&lt;P&gt;For the ranking you need to use ALLSELECTED( Sales[Status] ), not REMOVEFILTERS.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank =
RANKX (
    ALLSELECTED ( Sales[Customer] ),
    CALCULATE (
        Sales[Sales_M],
        REMOVEFILTERS ( Sales[Categoy] ),
        ALLSELECTED ( Sales[Status] )
    ),
    ,
    DESC,
    DENSE
)
&lt;/LI-CODE&gt;
&lt;P&gt;For the TopN filter you can create a numeric parameter and then create a measure like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Row Is Visible =
IF ( [Customer_Rank] &amp;lt;= [Top N Parameter Value], 1 )
&lt;/LI-CODE&gt;
&lt;P&gt;Use this as a filter on the visual to only show when the value is 1.&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 10:44:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703308#M180140</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-05-22T10:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703340#M180141</link>
      <description>&lt;P&gt;Thanks &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;for looking into it. If I use your new rank calculation then it is not respecting the status slicer and Unknown is showing in the status in the table for Microsoft customer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 11:06:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703340#M180141</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-05-22T11:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703586#M180150</link>
      <description>&lt;P&gt;That seems to be the behaviour of the Select All&amp;nbsp; option in the slicer. If you untick Select All and then select either Booked or Unbooked both then it works. With Select All selected the filter generated for the underlying DAX query is different.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do not tick the Select All option and choose Booked then the filter generated is&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR __DS0FilterTable3 = 
    TREATAS({"Booked"}, 'Sales'[Status])&lt;/LI-CODE&gt;
&lt;P&gt;If you tick the Select All option and then untick Not Booked the filter is&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR __DS0FilterTable3 = 
	FILTER(
		KEEPFILTERS(VALUES('Status'[Status])),
		NOT('Status'[Status] IN {"Not Booked"})
	)&lt;/LI-CODE&gt;
&lt;P&gt;The second version, with Select All ticked, checks that the Status is not "Not Booked", but this ignores the filter that you put on the slicer to not show Unknown.&lt;/P&gt;
&lt;P&gt;You should raise this as a bug with MS support.&lt;/P&gt;
&lt;P&gt;As a workaround, you may need to disable the Select All option.&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 12:43:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703586#M180150</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-05-22T12:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703646#M180154</link>
      <description>&lt;P&gt;Thanks for clarfication. It helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now. I created a Topn numeric parameter from Modelling tab and used this calculation to filter the top n customers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ShowTopNOpps =&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Customer_Rank]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;'Top N'&lt;/SPAN&gt;&lt;SPAN&gt;[Top N Value]&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;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I used this in Table visual filter and selected 1. Now Rank is again incorrect.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&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>Thu, 22 May 2025 13:03:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703646#M180154</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-05-22T13:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703721#M180159</link>
      <description>&lt;P&gt;can you upload the latest version of the PBIX ?&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 13:55:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703721#M180159</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-05-22T13:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703782#M180164</link>
      <description>&lt;P&gt;Here is the latest &lt;A title="PBIX" href="https://1drv.ms/u/c/08be67c11800d507/EeQymEmHJp9Bj1ZpjE6maOMBrVE8XSId5HfH6k4S92Bxbg?e=kcpCIh" target="_self"&gt;PBIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 14:27:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703782#M180164</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-05-22T14:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703873#M180167</link>
      <description>&lt;P&gt;I think I understand what the problem is but unfortunately I don't know how to fix it.&lt;/P&gt;
&lt;P&gt;Because there is a filter on the ShowTopNOpps measure the query generated for the table visual contains a SUMMARIZECOLUMNS which calculates the rows which should be visible in the final result. I think that this SUMMARIZECOLUMNS is generating a new shadow filter context, which is what is accessed by ALLSELECTED. This seems to be messing up the measure calculation.&lt;/P&gt;
&lt;P&gt;Given that there is no way to control the DAX query generated for the table visual, there is no way to get around this.&lt;/P&gt;
&lt;P&gt;The only thing that I could suggest is instead of using a parameter and measure to control the top N, use a Top N filter in the filter pane, ranking Customer by the customer ranking measure.&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 15:18:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703873#M180167</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-05-22T15:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703916#M180169</link>
      <description>&lt;P&gt;Thanks for insights. I need a slicer in my view so I can't use the Top N filter. I will wait for someone else to chime in. A few questions if you can help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How you're testing which filter are getting generated by dax queries like treatas, summarize as you shared in this post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. When to use the third parameter in rank. What is the significance of that and if there any performance benefit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Can we use TOPN dax function to filter the top n customer instead of RankX to overcome this issue ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; From where I can get advance knowldege of this evaluation context transitions. Its very confusing when to use which dax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 15:40:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4703916#M180169</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-05-22T15:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4704891#M180196</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="633018" data-lia-user-login="cruncher" class="lia-mention lia-mention-user"&gt;cruncher&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to Microsoft Fabric Community Forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are the few Points that can solve your issue.&lt;/P&gt;
&lt;P&gt;1) How you're testing which filters are getting generated by DAX queries like TREATAS, SUMMARIZE?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use DAX Studio to view effective filters, query plans, and server timings.&lt;/LI&gt;
&lt;LI&gt;Use Performance Analyzer in Power BI to see which DAX queries visuals are generating.&lt;/LI&gt;
&lt;LI&gt;Create debug measures using: CONCATENATEX(VALUES(Table[Column]), Table[Column], ", ")&lt;/LI&gt;
&lt;LI&gt;Use ISFILTERED, HASONEVALUE, VALUES to detect if a column is being filtered&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;2) When to use the third parameter in RANKX? What's the significance and any performance benefit?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Third parameter is used when the ranking expression returns a blank.&lt;/LI&gt;
&lt;LI&gt;Acts as a fallback value, often set to 0 or -1.&lt;/LI&gt;
&lt;LI&gt;Ensures blanks still receive a rank (e.g., customers with no sales).&lt;/LI&gt;
&lt;LI&gt;Provides more predictable ranking behavior.&lt;/LI&gt;
&lt;LI&gt;Minor performance impact; mostly used for logic consistency.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;3) Can we use TOPN DAX function to filter the top N customers instead of RANKX?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Yes, TOPN returns a table of top N values based on expression.&lt;/LI&gt;
&lt;LI&gt;Works well in calculated tables or virtual tables for visuals.&lt;/LI&gt;
&lt;LI&gt;Example with slicer: VAR N = SELECTEDVALUE(TopN[Value]) RETURN TOPN(N, VALUES(Customer[CustomerName]), [TotalSales], DESC)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;4) Where can I get advanced knowledge of evaluation context transitions?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Learn from sqlbi.com – highly recommended for DAX and model optimization.&lt;/LI&gt;
&lt;LI&gt;Read articles on context transition, row context vs. filter context.&lt;/LI&gt;
&lt;LI&gt;Use DAX.do for browser-based testing and DAX learning.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya.&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 09:32:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4704891#M180196</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-05-23T09:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4708262#M180327</link>
      <description>&lt;P&gt;Hi&lt;SPAN&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="633018" data-lia-user-login="cruncher" class="lia-mention lia-mention-user"&gt;cruncher&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?&lt;/P&gt;
&lt;P&gt;If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 05:48:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4708262#M180327</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-05-27T05:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4713510#M180531</link>
      <description>&lt;P&gt;Hi&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/633018" target="_blank"&gt;@cruncher&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?&lt;/P&gt;
&lt;P&gt;If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 07:33:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4713510#M180531</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-05-30T07:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4715346#M180609</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1250532" data-lia-user-login="v-kathullac" class="lia-mention lia-mention-user"&gt;v-kathullac&lt;/a&gt; I am still facing issue with showing correct rank when used with Top N calculation and john was not able to figure it out&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jun 2025 12:33:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4715346#M180609</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-06-01T12:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4716859#M180667</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="633018" data-lia-user-login="cruncher" class="lia-mention lia-mention-user"&gt;cruncher&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you try with below dax measures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create Sales Measure :&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales_M = SUM(Sales[Sales])&lt;/LI-CODE&gt;
&lt;P&gt;Initial Rank Measure &lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank =
RANKX(
ALLSELECTED(Sales[Customer]),
[Sales_M],
,
DESC,
DENSE
)&lt;/LI-CODE&gt;
&lt;P&gt;Make Category Passive in Rank&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank =
RANKX(
ALLSELECTED(Sales[Customer]),
CALCULATE([Sales_M], REMOVEFILTERS(Sales[Category])),
,
DESC,
DENSE
)&lt;/LI-CODE&gt;
&lt;P&gt;Make Status Passive in Rank (Breaks Slicer)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank =
RANKX(
ALLSELECTED(Sales[Customer]),
CALCULATE([Sales_M], REMOVEFILTERS(Sales[Category], Sales[Status])),
,
DESC,
DENSE
)&lt;/LI-CODE&gt;
&lt;P&gt;Final Rank Measure – Respects Slicer, Ignores Visual Filters&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank =
RANKX(
FILTER(
ALLSELECTED(Sales[Customer]),
CALCULATE(MAX(Sales[Status])) &amp;lt;&amp;gt; "Unknown" // optional
),
CALCULATE([Sales_M], REMOVEFILTERS(Sales[Category])),
,
DESC,
DENSE
)&lt;/LI-CODE&gt;
&lt;P&gt;Enable Dynamic Top N Filter&lt;BR /&gt;1.Create Top N Parameter (from Modeling)&lt;BR /&gt;Table_Name: TopNValue&lt;BR /&gt;Range: e.g., 1–20&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ShowTopN =
IF([Customer_Rank] &amp;lt;= [TopNValue], 1, 0)&lt;/LI-CODE&gt;
&lt;P&gt;Apply Visual-Level Filter : Drag ShowTopN to visual-level filter and Set it to show when value = 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 11:48:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4716859#M180667</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-06-02T11:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4721041#M180813</link>
      <description>&lt;P&gt;Hi&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/633018" target="_blank" rel="noopener"&gt;@cruncher&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?&lt;/P&gt;
&lt;P&gt;If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 08:07:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4721041#M180813</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-06-05T08:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4721813#M180850</link>
      <description>&lt;P&gt;It didn't work. Please try with pbix file I attached earlier&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 16:32:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4721813#M180850</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-06-05T16:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4724003#M180947</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="633018" data-lia-user-login="cruncher" class="lia-mention lia-mention-user"&gt;cruncher&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you check with below mentioned measure and let us know if you need any further assistance. for your reference am attaching a screenshot as well.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank 1 = 
VAR SelectedStatus = VALUES(Sales[Status])
RETURN
RANKX(
    FILTER(
        ALLSELECTED(Sales),
        Sales[Rank Source] = "Yes" &amp;amp;&amp;amp;
        Sales[Source] IN VALUES(Sales[Source]) &amp;amp;&amp;amp;
        Sales[Status] IN SelectedStatus
    ),
    CALCULATE(SUM(Sales[Sales])),
    ,
    DESC,
    DENSE
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jun 2025 14:44:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4724003#M180947</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-06-07T14:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4725265#M181000</link>
      <description>&lt;P&gt;Hi&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/633018" target="_blank" rel="noopener"&gt;@cruncher&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?&lt;/P&gt;
&lt;P&gt;If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 08:19:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4725265#M181000</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-06-09T08:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4725831#M181025</link>
      <description>&lt;P&gt;Thanks for trying but it still not giving correct rank.&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;</description>
      <pubDate>Mon, 09 Jun 2025 13:37:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4725831#M181025</guid>
      <dc:creator>cruncher</dc:creator>
      <dc:date>2025-06-09T13:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx function is behaving weird when used in table with extra columns and Slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4726490#M181053</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="633018" data-lia-user-login="cruncher" class="lia-mention lia-mention-user"&gt;cruncher&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try with below dax measure attaching the screenshot for your reference.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customer_Rank 3 = 
RANKX(
    FILTER(
        ALLSELECTED(Sales),
        Sales[Rank Source] = "Yes"
            &amp;amp;&amp;amp; Sales[Source] IN VALUES(Sales[Source])
    ),
    CALCULATE(SUM(Sales[Sales])),
    ,
    DESC,
    DENSE
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chaithanya.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 05:13:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-function-is-behaving-weird-when-used-in-table-with-extra/m-p/4726490#M181053</guid>
      <dc:creator>v-kathullac</dc:creator>
      <dc:date>2025-06-10T05:13:47Z</dc:date>
    </item>
  </channel>
</rss>

