<?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 not working properly when applying filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-not-working-properly-when-applying-filter/m-p/3198972#M116212</link>
    <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="542635" data-lia-user-login="aleivar" class="lia-mention lia-mention-user"&gt;aleivar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to change ALL to ALLSELECTED.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 22:35:04 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-04-20T22:35:04Z</dc:date>
    <item>
      <title>RANKX not working properly when applying filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-not-working-properly-when-applying-filter/m-p/3198949#M116208</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;My RANKX function is not working properly when I apply a Brand filter. For example, without filters I get the following rank&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But when I apply a Brand filter, to select only Pure Sunfarms, Redecan, and Good Supply the ranking changes:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My formula is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank (Total Sales) Brand = 
IF(
    HASONEVALUE(
        'OCS-daily-2018-2023'[brand]
    ),
    RANKX(
        ALL(
            'OCS-daily-2018-2023'[brand]
        ),
        [Total Sales],
        ,
        DESC,
        Dense
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my model looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 22:12:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-not-working-properly-when-applying-filter/m-p/3198949#M116208</guid>
      <dc:creator>aleivar</dc:creator>
      <dc:date>2023-04-20T22:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX not working properly when applying filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-not-working-properly-when-applying-filter/m-p/3198972#M116212</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="542635" data-lia-user-login="aleivar" class="lia-mention lia-mention-user"&gt;aleivar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to change ALL to ALLSELECTED.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 22:35:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-not-working-properly-when-applying-filter/m-p/3198972#M116212</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-20T22:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX not working properly when applying filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-not-working-properly-when-applying-filter/m-p/3199031#M116214</link>
      <description>&lt;P&gt;Hi, I tried that but it's not working. I want to keep the same rank:&lt;BR /&gt;1,2,3 even when applying the brand filter&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 23:28:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-not-working-properly-when-applying-filter/m-p/3199031#M116214</guid>
      <dc:creator>aleivar</dc:creator>
      <dc:date>2023-04-20T23:28:50Z</dc:date>
    </item>
  </channel>
</rss>

