<?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: Why does RANKX not filter correctly? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496962#M68927</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;ok, need to go deeper. It's already late night here. I'm from mobile now. Will take a look at it again tomorrow.&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 20:11:54 GMT</pubDate>
    <dc:creator>SpartaBI</dc:creator>
    <dc:date>2022-05-05T20:11:54Z</dc:date>
    <item>
      <title>Why does RANKX not filter correctly?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496437#M68894</link>
      <description>&lt;P&gt;I have a table the compares current counts to last month's counts and shows the percentage of change between them.&amp;nbsp; Using code from Marco Russo, I created the ranking formula below, based on the Diff %, which seems to be correct.&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;FONT color="#0000FF"&gt;_Inc Count Diff % PMs to SP Rank =&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;IF (&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISINSCOPE( 'INCIDENTS'[INC_CI_SERVICE] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANKX (&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALCULATETABLE (&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES ( 'INCIDENTS'[INC_CI_SERVICE] ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALLSELECTED ( 'INCIDENTS'[INC_CI_SERVICE] )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Incident Measures'[_Inc Diff % PMs to SP]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, so good....until I then filter on Rank less than 6 (I need the top 5).&amp;nbsp; When I do that, it shows only the first row vs showing the 5 rows through and including PeopleSearch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some aspect of RANKX that disallows ranking and filtering on percentage values?&amp;nbsp; Why won't this filter correctly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 15:25:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496437#M68894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T15:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why does RANKX not filter correctly?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496578#M68906</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;where do you apply this filter? On the visual level filters? You add code to the formula?&lt;BR /&gt;&lt;BR /&gt;Also, please try first writing this version of the formula (not sure it will work, but it's much better to write it this way. It should be the same, but maybe it's the reason for the issue because of Shadow Filters when you use the allslected in the way you used it):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_Inc Count Diff % PMs to SP Rank =

IF (

    ISINSCOPE( 'INCIDENTS'[INC_CI_SERVICE] ),

    RANKX (

         ALLSELECTED ( 'INCIDENTS'[INC_CI_SERVICE] ),

        'Incident Measures'[_Inc Diff % PMs to SP]

    )

)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 16:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496578#M68906</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-05-05T16:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why does RANKX not filter correctly?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496923#M68924</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377293" data-lia-user-login="SpartaBI" class="lia-mention lia-mention-user"&gt;SpartaBI&lt;/a&gt;&amp;nbsp;&amp;nbsp;Yes, I have 2 visual level filters.&amp;nbsp; One weeds out CI Services with less than 10 tickets and the other is to filter for ranks.&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;I tried your formula but it didn't make any difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 19:46:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496923#M68924</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T19:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why does RANKX not filter correctly?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496962#M68927</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;ok, need to go deeper. It's already late night here. I'm from mobile now. Will take a look at it again tomorrow.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 20:11:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2496962#M68927</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-05-05T20:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does RANKX not filter correctly?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2505371#M69364</link>
      <description>&lt;P&gt;The problem turned out to be ther other filter (_Inc Count is greater than 10).&amp;nbsp; PBI is applying filters in the "wrong" order.&amp;nbsp; It is ranking the items so if you filter on Rank less than 6, it returns that.&amp;nbsp; &lt;U&gt;Then&lt;/U&gt; it applies the _Inc Count is greater than 10.&amp;nbsp; If none of the items in the top 5 have more than 10 tickets, it returns nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need it to do is reverse that order of application.&amp;nbsp; So I'm going to create a new thread for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this isn't so much a solution as it is an explanation.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 15:41:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-does-RANKX-not-filter-correctly/m-p/2505371#M69364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-10T15:41:54Z</dc:date>
    </item>
  </channel>
</rss>

