<?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: Complex DAX Operation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-DAX-Operation/m-p/3366514#M126602</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="589352" data-lia-user-login="GovindPrajapat" class="lia-mention lia-mention-user"&gt;GovindPrajapat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Since you don't have an index column and the data transformation features are disabled for live streaming data, you can achieve your desired calculations using DAX measures instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.&amp;nbsp;Create Measures&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.1.&amp;nbsp;Difference between In DateTime and Out DateTime&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;In_Out_Difference = 
VAR CurrentDateTime = MIN('YourTable'[DateTime])
VAR NextDateTime = CALCULATE(MIN('YourTable'[DateTime]), 'YourTable'[DateTime] &amp;gt; CurrentDateTime, 'YourTable'[Tag] = "Out", 'YourTable'[PlatformId] = EARLIER('YourTable'[PlatformId]))
RETURN
IF('YourTable'[Tag] = "In" &amp;amp;&amp;amp; NOT(ISBLANK(NextDateTime)), NextDateTime - CurrentDateTime)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;1.2.&amp;nbsp;Difference between Work DateTime and EndStart DateTime&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Work_EndStart_Difference = 
VAR CurrentDateTime = MIN('YourTable'[DateTime])
VAR NextDateTime = CALCULATE(MIN('YourTable'[DateTime]), 'YourTable'[DateTime] &amp;gt; CurrentDateTime, 'YourTable'[Tag] = "EndStart", 'YourTable'[PlatformId] = EARLIER('YourTable'[PlatformId]))
RETURN
IF('YourTable'[Tag] = "Work" &amp;amp;&amp;amp; NOT(ISBLANK(NextDateTime)), NextDateTime - CurrentDateTime)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;1.3. Difference between EndStart DateTime and EndClose DateTime&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EndStart_EndClose_Difference = 
VAR CurrentDateTime = MIN('YourTable'[DateTime])
VAR NextDateTime = CALCULATE(MIN('YourTable'[DateTime]), 'YourTable'[DateTime] &amp;gt; CurrentDateTime, 'YourTable'[Tag] = "EndClose", 'YourTable'[PlatformId] = EARLIER('YourTable'[PlatformId]))
RETURN
IF('YourTable'[Tag] = "EndStart" &amp;amp;&amp;amp; NOT(ISBLANK(NextDateTime)), NextDateTime - CurrentDateTime)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;Create visuals using these measures to display the time differences for each platform based on the "Tag" values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Should you require further assistance please do not hesitate to reach out to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 05 Aug 2023 12:39:09 GMT</pubDate>
    <dc:creator>Sahir_Maharaj</dc:creator>
    <dc:date>2023-08-05T12:39:09Z</dc:date>
    <item>
      <title>Complex DAX Operation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-DAX-Operation/m-p/3357319#M126187</link>
      <description>&lt;P&gt;Hi, I have a live streaming dataset in power bi. The data transformation feature, Add new coloumn and create new table all of this features are disabled for live streaming data. The operation that i want to perform is like that : I have four coloumns in my dataset 1. PlatformId, 2. DateTime, 3. Tag, 4 Value. Now there is a pattern in my data. where the values of Tag are In, Work, EndStart, EndClose and Out sequentially, for this all five records platformId is same and datatime values are in ascending order. next five records are for another platform, then for next platform, then for next platform. I have total 5 platforms. After 5th platform it again starts from first platform and goes till 5th platform, again start from first platform..... and so on. Now i want to find out the difference between In DateTime and Out DateTime, Difference between Work DateTime and EndStart DateTime, Difference between EndStart DateTime and EndClose DateTime. How Can i do it. I dont have index coloumn in my dataset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2023 06:46:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-DAX-Operation/m-p/3357319#M126187</guid>
      <dc:creator>GovindPrajapat</dc:creator>
      <dc:date>2023-07-31T06:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Complex DAX Operation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-DAX-Operation/m-p/3366514#M126602</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="589352" data-lia-user-login="GovindPrajapat" class="lia-mention lia-mention-user"&gt;GovindPrajapat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Since you don't have an index column and the data transformation features are disabled for live streaming data, you can achieve your desired calculations using DAX measures instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.&amp;nbsp;Create Measures&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.1.&amp;nbsp;Difference between In DateTime and Out DateTime&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;In_Out_Difference = 
VAR CurrentDateTime = MIN('YourTable'[DateTime])
VAR NextDateTime = CALCULATE(MIN('YourTable'[DateTime]), 'YourTable'[DateTime] &amp;gt; CurrentDateTime, 'YourTable'[Tag] = "Out", 'YourTable'[PlatformId] = EARLIER('YourTable'[PlatformId]))
RETURN
IF('YourTable'[Tag] = "In" &amp;amp;&amp;amp; NOT(ISBLANK(NextDateTime)), NextDateTime - CurrentDateTime)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;1.2.&amp;nbsp;Difference between Work DateTime and EndStart DateTime&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Work_EndStart_Difference = 
VAR CurrentDateTime = MIN('YourTable'[DateTime])
VAR NextDateTime = CALCULATE(MIN('YourTable'[DateTime]), 'YourTable'[DateTime] &amp;gt; CurrentDateTime, 'YourTable'[Tag] = "EndStart", 'YourTable'[PlatformId] = EARLIER('YourTable'[PlatformId]))
RETURN
IF('YourTable'[Tag] = "Work" &amp;amp;&amp;amp; NOT(ISBLANK(NextDateTime)), NextDateTime - CurrentDateTime)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;1.3. Difference between EndStart DateTime and EndClose DateTime&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EndStart_EndClose_Difference = 
VAR CurrentDateTime = MIN('YourTable'[DateTime])
VAR NextDateTime = CALCULATE(MIN('YourTable'[DateTime]), 'YourTable'[DateTime] &amp;gt; CurrentDateTime, 'YourTable'[Tag] = "EndClose", 'YourTable'[PlatformId] = EARLIER('YourTable'[PlatformId]))
RETURN
IF('YourTable'[Tag] = "EndStart" &amp;amp;&amp;amp; NOT(ISBLANK(NextDateTime)), NextDateTime - CurrentDateTime)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;Create visuals using these measures to display the time differences for each platform based on the "Tag" values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Should you require further assistance please do not hesitate to reach out to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Aug 2023 12:39:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-DAX-Operation/m-p/3366514#M126602</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2023-08-05T12:39:09Z</dc:date>
    </item>
  </channel>
</rss>

