<?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: Help comparing last value with current one in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-comparing-last-value-with-current-one/m-p/3461218#M132024</link>
    <description>&lt;P&gt;k you so much this is just what I wanted&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 07:43:15 GMT</pubDate>
    <dc:creator>AJw1234</dc:creator>
    <dc:date>2023-10-05T07:43:15Z</dc:date>
    <item>
      <title>Help comparing last value with current one</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-comparing-last-value-with-current-one/m-p/3457887#M131821</link>
      <description>&lt;P&gt;I am struggling with what I thought would be a reasonably simple task for . &amp;nbsp;I have a &amp;nbsp;basic table which holds details of risks. &amp;nbsp;Each time the risk is updated the table is updated. &amp;nbsp;I need to be able to see whether the risk rating is higher or lower than the previous entry&lt;/P&gt;&lt;P&gt;Here is a representation of my table&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Title&lt;/TD&gt;&lt;TD&gt;Created&lt;/TD&gt;&lt;TD&gt;CurRating&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TestRisk1&lt;/TD&gt;&lt;TD&gt;03/03/23&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TestRisk1&lt;/TD&gt;&lt;TD&gt;03/04/23&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TestRisk1&lt;/TD&gt;&lt;TD&gt;21/04/23&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TestRisk2&lt;/TD&gt;&lt;TD&gt;03/03/23&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TestRisk2&lt;/TD&gt;&lt;TD&gt;19/03/23&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TestRisk2&lt;/TD&gt;&lt;TD&gt;04/05/23&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 03 Oct 2023 14:46:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-comparing-last-value-with-current-one/m-p/3457887#M131821</guid>
      <dc:creator>AJw1234</dc:creator>
      <dc:date>2023-10-03T14:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help comparing last value with current one</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-comparing-last-value-with-current-one/m-p/3460726#M132007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="466299" data-lia-user-login="AJw1234" class="lia-mention lia-mention-user"&gt;AJw1234&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can create a &lt;STRONG&gt;measure&lt;/STRONG&gt; as below to get it:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Difference = 
VAR _seltitle =
    SELECTEDVALUE ( 'Table'[Title] )
VAR _seldate =
    SELECTEDVALUE ( 'Table'[Created] )
VAR _predate =
    CALCULATE (
        MAX ( 'Table'[Created] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Created] &amp;lt; _seldate )
    )
VAR _prerating =
    CALCULATE (
        SUM ( 'Table'[CurRating] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Created] = _predate )
    )
RETURN
    IF ( ISBLANK ( _prerating ), BLANK (), SUM ( 'Table'[CurRating] ) - _prerating )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 01:54:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-comparing-last-value-with-current-one/m-p/3460726#M132007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-05T01:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help comparing last value with current one</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-comparing-last-value-with-current-one/m-p/3461218#M132024</link>
      <description>&lt;P&gt;k you so much this is just what I wanted&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 07:43:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-comparing-last-value-with-current-one/m-p/3461218#M132024</guid>
      <dc:creator>AJw1234</dc:creator>
      <dc:date>2023-10-05T07:43:15Z</dc:date>
    </item>
  </channel>
</rss>

