<?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 in value of different rows in same column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998516#M12600</link>
    <description>&lt;P&gt;I'm getting the error "A table of multiple values was supplied where a single value was expected". If I reduce the dataset down to a dozen devices then it does work, so I'm assuming its my data thats the issue! Would you mind explaining the LookupValue line as there are more arguments in there than I'm used to.&amp;nbsp; That might help me diagnose the issue with the dataset.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2020 13:24:24 GMT</pubDate>
    <dc:creator>anonomi</dc:creator>
    <dc:date>2020-03-30T13:24:24Z</dc:date>
    <item>
      <title>Difference in value of different rows in same column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998283#M12591</link>
      <description>&lt;P&gt;I have a table with a series of values for different devices and on different dates. I would like a calcualted column to subtract each value from the previous one (to measure the increase) based on the date it was received and for each device. I've found similar questions but I couldn't apply them to my problem (as dates weren't plus 1 and there are multiple devices).&amp;nbsp; I have already added a rank as I thought that would help with the filtering, but I'm still struggling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;Device&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Date_Rank&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;TD&gt;Desired Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;14/09/2019&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;15/08/2019&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12/06/2019&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;05/03/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;01/02/2020&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 10:36:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998283#M12591</guid>
      <dc:creator>anonomi</dc:creator>
      <dc:date>2020-03-30T10:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in value of different rows in same column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998329#M12593</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179130" data-lia-user-login="anonomi" class="lia-mention lia-mention-user"&gt;anonomi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Desired Value = 
var _prevRank = CALCULATE(MIN('Table'[Date_Rank]),FILTER(ALL('Table'),'Table'[Device]=EARLIER('Table'[Device]) &amp;amp;&amp;amp; 'Table'[Date_Rank] &amp;gt; EARLIER('Table'[Date_Rank])))
var _prevValue = LOOKUPVALUE('Table'[Value],'Table'[Device],[Device],'Table'[Date_Rank],_prevRank)
return
IF(ISBLANK(_prevValue), BLANK(), [Value]-_prevValue)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 11:12:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998329#M12593</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-30T11:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in value of different rows in same column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998516#M12600</link>
      <description>&lt;P&gt;I'm getting the error "A table of multiple values was supplied where a single value was expected". If I reduce the dataset down to a dozen devices then it does work, so I'm assuming its my data thats the issue! Would you mind explaining the LookupValue line as there are more arguments in there than I'm used to.&amp;nbsp; That might help me diagnose the issue with the dataset.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 13:24:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998516#M12600</guid>
      <dc:creator>anonomi</dc:creator>
      <dc:date>2020-03-30T13:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in value of different rows in same column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998858#M12617</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179130" data-lia-user-login="anonomi" class="lia-mention lia-mention-user"&gt;anonomi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you create a column or measure? it's a column&lt;/P&gt;
&lt;P&gt;this LOOKUP is trying to find Value with selected device and the next rank which you created. maybe you have rows with the same pair device-rank&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 16:03:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998858#M12617</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-03-30T16:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in value of different rows in same column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998875#M12620</link>
      <description>LOOKUPVALUE is a very slow function. Using it on a fact table will bring the calculation to a halt.&lt;BR /&gt;&lt;BR /&gt;It's kind of good for small dimensions but not for a fact table.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Mon, 30 Mar 2020 16:24:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-value-of-different-rows-in-same-column/m-p/998875#M12620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-30T16:24:19Z</dc:date>
    </item>
  </channel>
</rss>

