<?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 why we have to add Calculate in the expression part? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522929#M29760</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , In Rankx and X function, you need to add calculate to make sure calculation get evaluated properly&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer, it has been explained here &lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Nov 2020 02:25:25 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-11-30T02:25:25Z</dc:date>
    <item>
      <title>Rankx why we have to add Calculate in the expression part?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522340#M29729</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have tried the RankX function in a measure (and not in a column) but i am not sure to understand, what happened :&lt;/P&gt;&lt;P&gt;I mean when i don't add the Calculate function, The rank function stay to 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RankMeasureFail2 = RANKX(ALL(Table1),SUM(Table1[Price]))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;But this measure works : RankxMeasure = RANKX(ALL(Table1),CALCULATE(SUM(Table1[Price])))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A screen about my data :&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 09:02:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522340#M29729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-29T09:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx why we have to add Calculate in the expression part?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522348#M29730</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, it's all about some fundamental concepts in DAX, namely &lt;A href="https://adatis.co.uk/understanding-dax-through-the-power-of-evaluation-context/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;evaluation context&lt;/STRONG&gt;&lt;/A&gt; and &lt;A href="https://www.sqlbi.com/articles/understanding-context-transition/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;context transition&lt;/STRONG&gt;&lt;/A&gt;. You might want to refer to the articles I linked or google them yourself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As to &lt;STRONG&gt;RANKX ( &amp;lt;Table&amp;gt;, &amp;lt;Expression&amp;gt; [, &amp;lt;Value&amp;gt;] [, &amp;lt;Order&amp;gt;] [, &amp;lt;Ties&amp;gt;] )&lt;/STRONG&gt;,&amp;nbsp;&amp;lt;Table&amp;gt; is iterator, providing row context to &amp;lt;Expression&amp;gt;. One of the most remarkable features of CALCULATE()/CALCULATETABLE() functions is context transition, the row context is transited to filter context for the calculation of expression parameter, i.e.&amp;nbsp;SUM(Table1[Price]) here.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 09:35:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522348#M29730</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2020-11-29T09:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx why we have to add Calculate in the expression part?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522881#M29758</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;RANKX function creates a row context, the second parameter works on the context. if you just use SUM(), this works on current filter context, ie sum of all the price, then all the row in the same position. if add a CALCULATE function, then it transform current row context into filter context, then the sum is only of the rows filtered by this transformed context, ie sum of rows which is identical with current row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 02:01:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522881#M29758</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2020-11-30T02:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rankx why we have to add Calculate in the expression part?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522929#M29760</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , In Rankx and X function, you need to add calculate to make sure calculation get evaluated properly&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer, it has been explained here &lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns" target="_blank"&gt;https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 02:25:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rankx-why-we-have-to-add-Calculate-in-the-expression-part/m-p/1522929#M29760</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-30T02:25:25Z</dc:date>
    </item>
  </channel>
</rss>

