<?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 Comparison of Values from different rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/785653#M4287</link>
    <description>&lt;P&gt;Hey there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Got a little Problem with some data.&lt;/P&gt;&lt;P&gt;For better understanding here an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got a table with time stamps of machined parts. The time stamp tells me, when the part was finished. I would like to take the time stamp of the last part as start time for the next part. So I will get a time range, during which time a part was produced. In a second tabel I can compare the time ranges to error messages. That I already solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example for the tabel, the last column should be calculated.&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0" border="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;machine&lt;/TD&gt;&lt;TD&gt;part&lt;/TD&gt;&lt;TD&gt;End Time&lt;/TD&gt;&lt;TD&gt;Start Time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;07:30&lt;/TD&gt;&lt;TD&gt;Blank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;07:29&lt;/TD&gt;&lt;TD&gt;07:22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;07:37&lt;/TD&gt;&lt;TD&gt;07:30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;07:44&lt;/TD&gt;&lt;TD&gt;07:37&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;07:36&lt;/TD&gt;&lt;TD&gt;07:29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;07:51&lt;/TD&gt;&lt;TD&gt;07:44&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;07:22&lt;/TD&gt;&lt;TD&gt;Blank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;07:58&lt;/TD&gt;&lt;TD&gt;07:51&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to find the Min-Value of a filtered list where the row of the actual value is excepted. But I didn't get to a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully someone can help!&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2019 11:31:07 GMT</pubDate>
    <dc:creator>Gorgmaster</dc:creator>
    <dc:date>2019-09-06T11:31:07Z</dc:date>
    <item>
      <title>Comparison of Values from different rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/785653#M4287</link>
      <description>&lt;P&gt;Hey there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Got a little Problem with some data.&lt;/P&gt;&lt;P&gt;For better understanding here an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got a table with time stamps of machined parts. The time stamp tells me, when the part was finished. I would like to take the time stamp of the last part as start time for the next part. So I will get a time range, during which time a part was produced. In a second tabel I can compare the time ranges to error messages. That I already solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example for the tabel, the last column should be calculated.&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0" border="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;machine&lt;/TD&gt;&lt;TD&gt;part&lt;/TD&gt;&lt;TD&gt;End Time&lt;/TD&gt;&lt;TD&gt;Start Time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;07:30&lt;/TD&gt;&lt;TD&gt;Blank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;07:29&lt;/TD&gt;&lt;TD&gt;07:22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;07:37&lt;/TD&gt;&lt;TD&gt;07:30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;07:44&lt;/TD&gt;&lt;TD&gt;07:37&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;07:36&lt;/TD&gt;&lt;TD&gt;07:29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;07:51&lt;/TD&gt;&lt;TD&gt;07:44&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;07:22&lt;/TD&gt;&lt;TD&gt;Blank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;07:58&lt;/TD&gt;&lt;TD&gt;07:51&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to find the Min-Value of a filtered list where the row of the actual value is excepted. But I didn't get to a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully someone can help!&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 11:31:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/785653#M4287</guid>
      <dc:creator>Gorgmaster</dc:creator>
      <dc:date>2019-09-06T11:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison of Values from different rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786188#M4323</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;try this&lt;/P&gt;&lt;PRE&gt;Start time =
CALCULATE (
    MAX ( 'Table'[End Time] );
    FILTER (
        'Table';
        'Table'[machine] = EARLIER ( 'Table'[machine] )
            &amp;amp;&amp;amp; 'Table'[part] &amp;lt; EARLIER ( 'Table'[part] )
    )
)&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Sep 2019 13:17:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786188#M4323</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2019-09-07T13:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison of Values from different rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786717#M4346</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately it doesn't work. I've tried the formula with the exact given table in my question. But I got in the start-column the same time as in the end column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, the part number isn't meant as a rank. it is only a number.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 06:29:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786717#M4346</guid>
      <dc:creator>Gorgmaster</dc:creator>
      <dc:date>2019-09-09T06:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison of Values from different rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786800#M4350</link>
      <description>&lt;P&gt;So a slight modification to the code then:&lt;/P&gt;&lt;PRE&gt;Start time =
VAR _prevTime = 'Table'[End Time]
VAR _machine = 'Table'[machine]
RETURN
    CALCULATE (
        MAX ( 'Table'[End Time] );
        FILTER ( 'Table'; 'Table'[machine] = _machine &amp;amp;&amp;amp; 'Table'[End Time] &amp;lt; _prevTime )
    )&lt;/PRE&gt;&lt;P&gt;And just to be sure, you are trying to create a calculated column, right?&lt;BR /&gt;&lt;BR /&gt;This works on the sample data you provided. If you have trouble implementing it in your model, perhaps post a more realistic dataset?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 07:29:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786800#M4350</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2019-09-09T07:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comparison of Values from different rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786813#M4351</link>
      <description>&lt;P&gt;That's it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 07:37:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Comparison-of-Values-from-different-rows/m-p/786813#M4351</guid>
      <dc:creator>Gorgmaster</dc:creator>
      <dc:date>2019-09-09T07:37:52Z</dc:date>
    </item>
  </channel>
</rss>

