<?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: How to skip Same dates in Column and Consider Next Max dates in DAX in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3834015#M1237862</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/473297" target="_blank"&gt;@v-xinruzhu-msft&lt;/A&gt;&amp;nbsp;Any update on the above mentioned Query.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2024 12:44:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-12T12:44:56Z</dc:date>
    <item>
      <title>How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3809780#M1232382</link>
      <description>&lt;P&gt;I need to show the calculation as "If End Time is lesser than Next row&amp;nbsp; start Time it need to show me the other row which is higher than End Time .. Example - In below screenshot in Second row End Time is 1/15/2024 9:12:00 Am and Next start time is 1/14/2024 6:43:33 Pm .. As the 3rd row start time is lesser than 2nd row End time it show negative values .. Here i need calculation where it should capture 1/18/2024 9:17:37 AM in Second row Next start time ... Thank you sooo much for helping in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="272177" data-lia-user-login="PBCommunity" class="lia-mention lia-mention-user"&gt;PBCommunity&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/645341" target="_blank" rel="noopener"&gt;@community&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;support&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437133" data-lia-user-login="v-xiaosun-msft" class="lia-mention lia-mention-user"&gt;v-xiaosun-msft&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 07:40:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3809780#M1232382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-04T07:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3810166#M1232503</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;You'll need an Index to define "next". Then something along these lines.&amp;nbsp;See my article on Mean Time Between Failure (MTBF) which uses EARLIER: &lt;A href="http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586" target="_blank"&gt;http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586&lt;/A&gt;.&lt;BR /&gt;The basic pattern is:&lt;BR /&gt;Column =&amp;nbsp;&lt;BR /&gt;&amp;nbsp; VAR __Current = [Value]&lt;BR /&gt;&amp;nbsp; VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] &amp;lt; EARLIER('Table'[Date])),[Date])&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])&lt;BR /&gt;RETURN&lt;BR /&gt;&amp;nbsp;( __Current - __Previous ) * 1.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 09:21:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3810166#M1232503</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-04-04T09:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3810375#M1232568</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; Thanks for your response .. I am getting the below error when i am trying to update the formula&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure for Value should i consider Index or the Number column..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me with the exact formula that would be really helpful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Column =&amp;nbsp;&lt;BR /&gt;&amp;nbsp; VAR __Current = [Value]&lt;BR /&gt;&amp;nbsp; VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] &amp;lt; EARLIER('Table'[Date])),[Date])&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])&lt;BR /&gt;RETURN&lt;BR /&gt;&amp;nbsp;( __Current - __Previous ) * 1.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 10:15:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3810375#M1232568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-04T10:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3810398#M1232575</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;To get you a specific answer, I would need sample data to create the scenario (see below). As for the current error you are receiving, you need to replace [Date] with either [Actual Start CST] or [End Time CST] or [Next Start Time] depending on your need. Has to be an actual column in your table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, having trouble following, can you post sample data as text and expected output?&lt;BR /&gt;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 10:19:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3810398#M1232575</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-04-04T10:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3817413#M1234384</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the solution&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; provided, and i want to offer some more information for you to refer to, based on your description, you should want to get the next start time greater than the current end time if the current end time is greater than the start time of the next row? if you want to achieve this, you can refer to the following solution.&lt;/P&gt;
&lt;P&gt;first,&amp;nbsp; as&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; mentioned, you need to have an index column, then you can create the measure below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _nextstarttime =
    CALCULATE (
        MAX ( 'Incident'[Actual Start CST] ),
        ALLSELECTED ( 'Incident' ),
        'Incident'[Index]
            = MAX ( 'Incident'[Index] ) + 1
    )
VAR _index =
    CALCULATE (
        MIN ( 'Incident'[Index] ),
        ALLSELECTED ( 'Incident' ),
        'Incident'[Actual Start CST] &amp;gt; MAX ( 'Incident'[END Time CST] ),
        'Incident'[Index]
            &amp;gt; MAX ( 'Incident'[Index] ) + 1
    )
RETURN
    IF (
        MAX ( 'Incident'[END Time CST] ) &amp;gt; _nextstarttime,
        CALCULATE (
            MAX ( 'Incident'[Actual Start CST] ),
            ALLSELECTED ( 'Incident' ),
            'Incident'[Index] = _index
        ),
        _nextstarttime
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Ouptut&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&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>Mon, 08 Apr 2024 03:01:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3817413#M1234384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-08T03:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3819889#M1234963</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@&amp;nbsp;v-xinruzhu-msft . Thank you for the response and the data is alsmot matched. But one issue is it should not consider the date if the Actual start CST is same date for the next row.. For example&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd row Actual start CST and 3rd row actual CST is on same date . Hence its should capture for only 2nd row and for 3rd row it should show blank/Zero . The one that is highlighted in Yellow should be in Blank/zero. On 5th row you can see that the dates is falling between 4th row End Time CST . Hence i cant show the duration for the same dates twice . I am Trying to find out the Uptime of the Incidents&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 13:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3819889#M1234963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-08T13:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3821212#M1235376</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply and based on your description, please try the following measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _nextstarttime =
    CALCULATE (
        MAX ( 'Incident'[Actual Start CST] ),
        ALLSELECTED ( 'Incident' ),
        'Incident'[Index]
            = MAX ( 'Incident'[Index] ) + 1
    )
VAR _index =
    CALCULATE (
        MIN ( 'Incident'[Index] ),
        ALLSELECTED ( 'Incident' ),
        'Incident'[Actual Start CST] &amp;gt; MAX ( 'Incident'[END Time CST] ),
        'Incident'[Index]
            &amp;gt; MAX ( 'Incident'[Index] ) + 1
    )
RETURN
    IF (
        MAX ( 'Incident'[END Time CST] ) &amp;gt; _nextstarttime,
        CALCULATE (
            MAX ( 'Incident'[Actual Start CST] ),
            ALLSELECTED ( 'Incident' ),
            'Incident'[Index] = _index
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 01:12:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3821212#M1235376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-09T01:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3826176#M1236483</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Thanks for your reply&amp;nbsp;. I see there are many blanks on the dates (Measure) as the dates are not capturing correctly. Below is the screen shot of the same&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manu B K&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 08:31:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3826176#M1236483</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-10T08:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip Same dates in Column and Consider Next Max dates in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3834015#M1237862</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/473297" target="_blank"&gt;@v-xinruzhu-msft&lt;/A&gt;&amp;nbsp;Any update on the above mentioned Query.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 12:44:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/How-to-skip-Same-dates-in-Column-and-Consider-Next-Max-dates-in/m-p/3834015#M1237862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-12T12:44:56Z</dc:date>
    </item>
  </channel>
</rss>

