<?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: Identify Leave Rows with Matching Dates and One Entry Cancelled (0 Hours) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4685672#M179464</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/564261" target="_self"&gt;&lt;SPAN class=""&gt;Sunila&lt;/SPAN&gt;&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;It would be great if you can provide some sample data. Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;/* =====================================================================&amp;nbsp; */&lt;/P&gt;&lt;P&gt;If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too.&amp;nbsp;And if you found it useful, a quick "Kudos" is always appreciated — thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maruthi&amp;nbsp;&lt;/P&gt;&lt;P&gt;LinkedIn -&amp;nbsp;&lt;A href="http://www.linkedin.com/in/maruthi-siva-prasad/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.linkedin.com/in/maruthi-siva-prasad/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;A href="https://x.com/maruthisp" target="_blank" rel="nofollow noopener noreferrer"&gt;Maruthi Siva Prasad - (@MaruthiSP) / X&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;/* =====================================================================&amp;nbsp; */&lt;/P&gt;</description>
    <pubDate>Fri, 09 May 2025 00:49:03 GMT</pubDate>
    <dc:creator>maruthisp</dc:creator>
    <dc:date>2025-05-09T00:49:03Z</dc:date>
    <item>
      <title>Identify Leave Rows with Matching Dates and One Entry Cancelled (0 Hours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4685286#M179453</link>
      <description>&lt;P&gt;I have a following leave dataset where employees submit leave requests in hours. Sometimes a leave request (e.g., for 4 hours) is later cancelled. In the data, this cancelled entry appears as a &lt;STRONG&gt;separate row with 0 hours&lt;/STRONG&gt; and a &lt;STRONG&gt;status of "Completed"&lt;/STRONG&gt;, while the original request has between &lt;STRONG&gt;1 to 8 hours&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I would like to create a &lt;STRONG&gt;DAX calculated column&lt;/STRONG&gt; that identifies this kind of pair:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Two rows with the &lt;STRONG&gt;same LeaveDate&lt;/STRONG&gt; (and ideally the same EmployeeID),&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;One of them has Hrs = 0 and Status = "Completed",&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;The other has Hrs between 1 and 8.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;The goal is to &lt;STRONG&gt;flag the 0-hour "Completed" row&lt;/STRONG&gt; as a cancellation of a previous leave request.&lt;/P&gt;&lt;P class=""&gt;Any guidance or sample DAX would be greatly appreciated!&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;</description>
      <pubDate>Thu, 08 May 2025 15:43:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4685286#M179453</guid>
      <dc:creator>Sunila</dc:creator>
      <dc:date>2025-05-08T15:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Leave Rows with Matching Dates and One Entry Cancelled (0 Hours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4685465#M179460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564261" data-lia-user-login="Sunila" class="lia-mention lia-mention-user"&gt;Sunila&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To identify cancellations in your leave data, you can create a calculated column that checks for two key conditions:&lt;/P&gt;&lt;P&gt;The current row shows 0 hours and has a "Completed" status (indicating a cancellation).&lt;/P&gt;&lt;P&gt;There is another row for the same employee and same leave date with a leave request between 1 to 8 hours (indicating the original request).&lt;/P&gt;&lt;P&gt;If both conditions are met, the 0-hour row is flagged as a cancellation of the original leave.&lt;BR /&gt;This approach will help you clearly distinguish between genuine leave entries and those that represent canceled requests.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;***********************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;BR /&gt;Sarita&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 17:35:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4685465#M179460</guid>
      <dc:creator>saritasw</dc:creator>
      <dc:date>2025-05-08T17:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Leave Rows with Matching Dates and One Entry Cancelled (0 Hours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4685672#M179464</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/564261" target="_self"&gt;&lt;SPAN class=""&gt;Sunila&lt;/SPAN&gt;&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;It would be great if you can provide some sample data. Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;/* =====================================================================&amp;nbsp; */&lt;/P&gt;&lt;P&gt;If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too.&amp;nbsp;And if you found it useful, a quick "Kudos" is always appreciated — thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maruthi&amp;nbsp;&lt;/P&gt;&lt;P&gt;LinkedIn -&amp;nbsp;&lt;A href="http://www.linkedin.com/in/maruthi-siva-prasad/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.linkedin.com/in/maruthi-siva-prasad/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;A href="https://x.com/maruthisp" target="_blank" rel="nofollow noopener noreferrer"&gt;Maruthi Siva Prasad - (@MaruthiSP) / X&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;/* =====================================================================&amp;nbsp; */&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 00:49:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4685672#M179464</guid>
      <dc:creator>maruthisp</dc:creator>
      <dc:date>2025-05-09T00:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Leave Rows with Matching Dates and One Entry Cancelled (0 Hours)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4686097#M179483</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564261" data-lia-user-login="Sunila" class="lia-mention lia-mention-user"&gt;Sunila&lt;/a&gt;&amp;nbsp;please try this calculated column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IsCancellation =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentEmployee&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Sheet5&lt;/SPAN&gt;&lt;SPAN&gt;[EmployeeID]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Sheet5&lt;/SPAN&gt;&lt;SPAN&gt;[LeaveDate]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentHrs&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;S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;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;sheet5&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;sheet5&lt;/SPAN&gt;&lt;SPAN&gt;[EmployeeID]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CurrentEmployee&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;sheet5&lt;/SPAN&gt;&lt;SPAN&gt;[LeaveDate]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;sheet5&lt;/SPAN&gt;&lt;SPAN&gt;[Hrs]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;Sheet5&lt;/SPAN&gt;&lt;SPAN&gt;[Hrs]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;8&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ) &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Yes"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"No"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 May 2025 07:15:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Identify-Leave-Rows-with-Matching-Dates-and-One-Entry-Cancelled/m-p/4686097#M179483</guid>
      <dc:creator>techies</dc:creator>
      <dc:date>2025-05-09T07:15:30Z</dc:date>
    </item>
  </channel>
</rss>

