<?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 how to exclude certain rows from the context in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2549259#M72083</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check the formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR rank_ =
    RANKX (
        'Table',
        CALCULATE (
            SUM ( 'Table'[Sales] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Continent] = EARLIER ( 'Table'[Continent] )
                    &amp;amp;&amp;amp; 'Table'[Country] &amp;lt;&amp;gt; "France"
            )
        ),
        ,
        DESC,
        DENSE
    )
RETURN
    IF ( 'Table'[Country] = "France", BLANK (), rank_ )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 06:44:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-31T06:44:39Z</dc:date>
    <item>
      <title>RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538274#M71419</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I am applying the below RANKX formula,&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Rank = &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Continent]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Continent]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;To get a Rank based on Continent.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I want to exclude certain countries, say France in this example, how to restructure the formula for this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;India&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Pakistan&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Asia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Australia&lt;/TD&gt;&lt;TD&gt;85&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Australia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Europe&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 May 2022 08:36:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538274#M71419</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-25T08:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538310#M71422</link>
      <description>&lt;P&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Rank =
RANKX (
    FILTER (
        ALL ( 'Table'[Continent] ),
        CALCULATE ( VALUES ( 'Table'[Country] ) ) &amp;lt;&amp;gt; "France"
    ),
    CALCULATE ( SUM ( 'Table'[Sales] ), ALLEXCEPT ( 'Table', 'Table'[Continent] ) )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 May 2022 08:43:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538310#M71422</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-25T08:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538361#M71423</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It is wrongly calculating Rank of France here as 2, as I mentioned, I want to exclude France from this Ranking.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 08:56:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538361#M71423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-25T08:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538461#M71426</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Just to properly understand your rquirement. If we exclude India and China for example, then Asia will be ranked 3? Is this what you want?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 09:32:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538461#M71426</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-25T09:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538480#M71427</link>
      <description>&lt;P&gt;Yes excatly&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 09:40:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538480#M71427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-25T09:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538508#M71429</link>
      <description>&lt;P&gt;Yes exactly&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 09:49:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538508#M71429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-25T09:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538538#M71432</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Rank =
RANKX (
    ALL ( 'Table'[Continent] ),
    CALCULATE (
        SUMX (
            CALCULATETABLE (
                FILTER ( 'Table', NOT ( 'Table'[Country] IN { "India", "China" } ) ),
                ALLEXCEPT ( 'Table', 'Table'[Continent] )
            ),
            'Table'[Sales]
        )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 May 2022 09:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538538#M71432</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-25T09:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538591#M71436</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First &amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;I can remove Sales from the context itself whenever I have France, In my case, it is "d"&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Column = &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;all&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet3&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;Sheet3[Category]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet3[Category]&lt;/SPAN&gt;&lt;SPAN&gt;) ),&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;IF(Sheet3[Sub Category]="d","",Sheet3[Sales]&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;),,&lt;/SPAN&gt;&lt;SPAN&gt;ASC&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Dense&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;By doing this I am ensuring that it will come at the bottom of my Rankings within a Category(&lt;STRONG&gt;NULL&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;New Rank = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sheet3[Sub Category]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"d"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Sheet3[Column]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can exclude these 0s in the main dashboard as needed, also Ranking will not affect, it will just exclude d/France&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ritesh&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 May 2022 10:22:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2538591#M71436</guid>
      <dc:creator>ribisht17</dc:creator>
      <dc:date>2022-05-25T10:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX how to exclude certain rows from the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2549259#M72083</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check the formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR rank_ =
    RANKX (
        'Table',
        CALCULATE (
            SUM ( 'Table'[Sales] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Continent] = EARLIER ( 'Table'[Continent] )
                    &amp;amp;&amp;amp; 'Table'[Country] &amp;lt;&amp;gt; "France"
            )
        ),
        ,
        DESC,
        DENSE
    )
RETURN
    IF ( 'Table'[Country] = "France", BLANK (), rank_ )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 06:44:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-how-to-exclude-certain-rows-from-the-context/m-p/2549259#M72083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-31T06:44:39Z</dc:date>
    </item>
  </channel>
</rss>

