<?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: Difference Between Two Related Rows in a Table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-Between-Two-Related-Rows-in-a-Table/m-p/3204342#M116647</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="294395" data-lia-user-login="samdep" class="lia-mention lia-mention-user"&gt;samdep&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;First, please make sure that what you are creating is a &lt;STRONG&gt;&lt;FONT color="#000000"&gt;calculated column&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;not&lt;/FONT&gt; &lt;/STRONG&gt;a measure, then update its formula as below to get the expected result:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Judgment Variance = 
VAR _nextindex =
    MINX (
        FILTER (
            'Assessment',
            'Assessment'[Index] &amp;gt; EARLIER ( [Index] )
                &amp;amp;&amp;amp; 'Assessment'[Manager &amp;amp; Direct Report] = 'Assessment'[Manager &amp;amp; Direct Report]
        ),
        [Index]
    )
VAR _nextrating =
    MAXX (
        FILTER (
            'Assessment',
            'Assessment'[Index] = _nextindex
                &amp;amp;&amp;amp; 'Assessment'[Manager &amp;amp; Direct Report] = EARLIER ( 'Assessment'[Manager &amp;amp; Direct Report] )
        ),
        [Judgment]
    )
RETURN
    IF (
        ISBLANK ( _nextrating )
            || _nextrating = 'Assessment'[Judgment],
        BLANK (),
        ABS ( 'Assessment'[Judgment] - _nextrating )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 06:41:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-04-25T06:41:55Z</dc:date>
    <item>
      <title>Difference Between Two Related Rows in a Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-Between-Two-Related-Rows-in-a-Table/m-p/3174522#M114549</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table, similar to the below, where I'd like to show the difference between the manager's rating of the direct report and the direct report's rating of themselves. I'd like to create a measure that looks at the difference between the manager's rating and the direct report's rating, and from there, add a flag within the cell if the difference between the two ratings is greater than or equal to 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously, I had used the following DAX measure and it worked fine, but now it's throwing an error with 'EARLIER'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Judgment Variance =&amp;nbsp;&lt;BR /&gt;VAR _MAX = MAXX(FILTER('Assessments', 'Assessment'[Index] &amp;lt; EARLIER([Index]) &amp;amp;&amp;amp; 'Assessment{'Manager &amp;amp; Direct Report'] = EARLIER('Assessment{'Manager &amp;amp; Direct Report'])), [Index]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR _RATING = 'Assessment'[Judgment] -&amp;nbsp;MAXX(FILTER('Assessments', 'Assessment'[Index] &amp;lt; EARLIER([Index]) &amp;amp;&amp;amp; 'Assessment{'Manager &amp;amp; Direct Report'] = EARLIER('Assessment{'Manager &amp;amp; Direct Report'])), 'Assessment'[Judgment]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(_RATING = 'Assessment'[Judgment], BLANK(),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF(_RATING = 0, BLANK(), ABS(_RATING))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any guidance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Date&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Index&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Name&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Type&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Manager&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Mgr &amp;amp;&amp;nbsp; Report&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Judgment Rating&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2" color="#0000FF"&gt;Judgment Variance&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;3/31/2023 4:00pm&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;John&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Assessment of Report&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;John-Sally&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2" color="#0000FF"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;4/2/2023 5:00pm&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Sally&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Self-Assessment&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;John&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;John-Sally&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 05 Apr 2023 18:48:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-Between-Two-Related-Rows-in-a-Table/m-p/3174522#M114549</guid>
      <dc:creator>samdep</dc:creator>
      <dc:date>2023-04-05T18:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference Between Two Related Rows in a Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-Between-Two-Related-Rows-in-a-Table/m-p/3174971#M114581</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="294395" data-lia-user-login="samdep" class="lia-mention lia-mention-user"&gt;samdep&lt;/a&gt; , try like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Judgment Variance = &lt;BR /&gt;VAR _MAX = MAXX(FILTER('Assessments', 'Assessment'[Index] &amp;lt; EARLIER([Index]) &amp;amp;&amp;amp; 'Assessment'[Manager &amp;amp; Direct Report] = EARLIER('Assessment'[Manager &amp;amp; Direct Report])), 'Assessment'[Index])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR _RATING = 'Assessment'[Judgment] - MAXX(FILTER('Assessments', 'Assessment'[Index] =_max &amp;amp;&amp;amp; 'Assessment'[Manager &amp;amp; Direct Report] = EARLIER('Assessment'[Manager &amp;amp; Direct Report])), 'Assessment'[Judgment])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RETURN&lt;/P&gt;
&lt;P&gt;IF(_RATING = 'Assessment'[Judgment], BLANK(),&lt;BR /&gt;IF(_RATING = 0, BLANK(), ABS(_RATING))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI DAX- Earlier, I should have known Earlier: &lt;A href="https://www.youtube.com/watch?v=cN8AO3_vmlY&amp;amp;t=17820s" target="_blank"&gt;https://www.youtube.com/watch?v=cN8AO3_vmlY&amp;amp;t=17820s&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Power BI DAX- Earlier, I should have known Earlier: &lt;A href="https://youtu.be/CVW6YwvHHi8" target="_blank"&gt;https://youtu.be/CVW6YwvHHi8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 02:00:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-Between-Two-Related-Rows-in-a-Table/m-p/3174971#M114581</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-04-06T02:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Difference Between Two Related Rows in a Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-Between-Two-Related-Rows-in-a-Table/m-p/3204342#M116647</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="294395" data-lia-user-login="samdep" class="lia-mention lia-mention-user"&gt;samdep&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;First, please make sure that what you are creating is a &lt;STRONG&gt;&lt;FONT color="#000000"&gt;calculated column&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;not&lt;/FONT&gt; &lt;/STRONG&gt;a measure, then update its formula as below to get the expected result:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Judgment Variance = 
VAR _nextindex =
    MINX (
        FILTER (
            'Assessment',
            'Assessment'[Index] &amp;gt; EARLIER ( [Index] )
                &amp;amp;&amp;amp; 'Assessment'[Manager &amp;amp; Direct Report] = 'Assessment'[Manager &amp;amp; Direct Report]
        ),
        [Index]
    )
VAR _nextrating =
    MAXX (
        FILTER (
            'Assessment',
            'Assessment'[Index] = _nextindex
                &amp;amp;&amp;amp; 'Assessment'[Manager &amp;amp; Direct Report] = EARLIER ( 'Assessment'[Manager &amp;amp; Direct Report] )
        ),
        [Judgment]
    )
RETURN
    IF (
        ISBLANK ( _nextrating )
            || _nextrating = 'Assessment'[Judgment],
        BLANK (),
        ABS ( 'Assessment'[Judgment] - _nextrating )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 06:41:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-Between-Two-Related-Rows-in-a-Table/m-p/3204342#M116647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-25T06:41:55Z</dc:date>
    </item>
  </channel>
</rss>

