<?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: Calculated column. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872599#M92763</link>
    <description>&lt;P&gt;is this the desired result?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Result = 
var _Currentcategory=Table1[Category Id]
var _Previousrating= MINX(FILTER(Table1,Table1[Rating]&amp;lt;EARLIER(Table1[Rating]) &amp;amp;&amp;amp; Table1[Category Id]=_Currentcategory &amp;amp;&amp;amp; Table1[Base] = "true"),Table1[Rating])
var _Previousrating2= MINX(FILTER(Table1,Table1[Rating]&amp;gt;EARLIER(Table1[Rating]) &amp;amp;&amp;amp; Table1[Category Id]=_Currentcategory &amp;amp;&amp;amp; Table1[Base] = "true"),Table1[Rating])
var _result=Table1[Rating]-_Previousrating -_Previousrating2
return IF(Table1[Base]="true",0,_result)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Sun, 30 Oct 2022 00:02:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-30T00:02:42Z</dc:date>
    <item>
      <title>Calculated column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872540#M92754</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Here is the original table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need a calculated column that will for each category display the difference in rating from the base rating for that category.&lt;/P&gt;&lt;P&gt;Here are what the column results would be:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 22:40:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872540#M92754</guid>
      <dc:creator>bob57</dc:creator>
      <dc:date>2022-10-29T22:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872555#M92755</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="198866" data-lia-user-login="bob57" class="lia-mention lia-mention-user"&gt;bob57&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;pelase try :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Result = 
var _Currentcategory=Table1[Category Id]
var _Previousrating= MINX(FILTER(Table1,Table1[Rating]&amp;lt;EARLIER(Table1[Rating]) &amp;amp;&amp;amp; Table1[Category Id]=_Currentcategory),Table1[Rating])
var _result=Table1[Rating]-_Previousrating
return IF(ISBLANK(_Previousrating),0,_result)&lt;/LI-CODE&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;if you find this helpful, please consider accepting it as a solution and a kudos is appreciated&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 23:04:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872555#M92755</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-29T23:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872562#M92757</link>
      <description>&lt;P&gt;This solution works beautifully! Now I have to figure out how it works.&amp;nbsp;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 23:15:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872562#M92757</guid>
      <dc:creator>bob57</dc:creator>
      <dc:date>2022-10-29T23:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872565#M92758</link>
      <description>&lt;P&gt;basically, in the MINX,in table selection , you want to filter the table first to show it - 1 row&lt;BR /&gt;hence using the earlier , since we used eralier([rating]) this will show 1 row before, the earlier can be used with ealier([rating],2) to show 2 rows before...&amp;nbsp;&lt;BR /&gt;hence we filtered the table to show the earlier result and substract current wit hearlier ,then we want to go from down to up so we use MINX to pick up the last one instead of going from up to down, in that case you will use MAXX like the example below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 23:26:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872565#M92758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-29T23:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872579#M92759</link>
      <description>&lt;P&gt;I jumped the gun. There is still one small issue. The calculation must be relative to the Base. So with Category Id 3, record Id = 8 should be 0 (Base = TRUE) and record Id = 9 should be -1.4 (47.6 - 49). So sorry for not being more thorough at first glance.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2022 23:42:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872579#M92759</guid>
      <dc:creator>bob57</dc:creator>
      <dc:date>2022-10-29T23:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872599#M92763</link>
      <description>&lt;P&gt;is this the desired result?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Result = 
var _Currentcategory=Table1[Category Id]
var _Previousrating= MINX(FILTER(Table1,Table1[Rating]&amp;lt;EARLIER(Table1[Rating]) &amp;amp;&amp;amp; Table1[Category Id]=_Currentcategory &amp;amp;&amp;amp; Table1[Base] = "true"),Table1[Rating])
var _Previousrating2= MINX(FILTER(Table1,Table1[Rating]&amp;gt;EARLIER(Table1[Rating]) &amp;amp;&amp;amp; Table1[Category Id]=_Currentcategory &amp;amp;&amp;amp; Table1[Base] = "true"),Table1[Rating])
var _result=Table1[Rating]-_Previousrating -_Previousrating2
return IF(Table1[Base]="true",0,_result)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sun, 30 Oct 2022 00:02:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872599#M92763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-30T00:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872605#M92765</link>
      <description>&lt;P&gt;Yes. That does it. Thanks you!&lt;/P&gt;</description>
      <pubDate>Sun, 30 Oct 2022 00:07:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column/m-p/2872605#M92765</guid>
      <dc:creator>bob57</dc:creator>
      <dc:date>2022-10-30T00:07:25Z</dc:date>
    </item>
  </channel>
</rss>

