<?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 Creating a flag using a value and two date fields in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-flag-using-a-value-and-two-date-fields/m-p/4333347#M172046</link>
    <description>&lt;P&gt;Hi Power Bi community,&lt;/P&gt;&lt;P&gt;I am hoping to gather some help in creating a flag to identify multiple service orders for a serial number based on contract start and end dates. I find it difficult to phrase this question....I belive the below visual shows this better then I can explain.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first two rows show 2 service orders for the same serial # with the same contract start and end date. The bottom two rows show 2 service orders for the same serial # but from different contract start and end dates. I am hoping to have the column "Miltiple Service Orders in a Contract" using DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Service order #&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Serial #&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Contract Start Dt&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Contract End Dt&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Miltiple Service Orders in a Contract&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;1/1/2023&lt;/TD&gt;&lt;TD&gt;12/31/2023&lt;/TD&gt;&lt;TD&gt;yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;1/1/2023&lt;/TD&gt;&lt;TD&gt;12/31/2023&lt;/TD&gt;&lt;TD&gt;yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;3/31/2023&lt;/TD&gt;&lt;TD&gt;3/31/2024&lt;/TD&gt;&lt;TD&gt;no&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;4/1/2024&lt;/TD&gt;&lt;TD&gt;4/1/2025&lt;/TD&gt;&lt;TD&gt;no&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Tue, 17 Dec 2024 15:16:48 GMT</pubDate>
    <dc:creator>Ben_jamin</dc:creator>
    <dc:date>2024-12-17T15:16:48Z</dc:date>
    <item>
      <title>Creating a flag using a value and two date fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-flag-using-a-value-and-two-date-fields/m-p/4333347#M172046</link>
      <description>&lt;P&gt;Hi Power Bi community,&lt;/P&gt;&lt;P&gt;I am hoping to gather some help in creating a flag to identify multiple service orders for a serial number based on contract start and end dates. I find it difficult to phrase this question....I belive the below visual shows this better then I can explain.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first two rows show 2 service orders for the same serial # with the same contract start and end date. The bottom two rows show 2 service orders for the same serial # but from different contract start and end dates. I am hoping to have the column "Miltiple Service Orders in a Contract" using DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Service order #&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Serial #&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Contract Start Dt&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Contract End Dt&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Miltiple Service Orders in a Contract&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;1/1/2023&lt;/TD&gt;&lt;TD&gt;12/31/2023&lt;/TD&gt;&lt;TD&gt;yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;1/1/2023&lt;/TD&gt;&lt;TD&gt;12/31/2023&lt;/TD&gt;&lt;TD&gt;yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;3/31/2023&lt;/TD&gt;&lt;TD&gt;3/31/2024&lt;/TD&gt;&lt;TD&gt;no&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;4/1/2024&lt;/TD&gt;&lt;TD&gt;4/1/2025&lt;/TD&gt;&lt;TD&gt;no&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 17 Dec 2024 15:16:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-flag-using-a-value-and-two-date-fields/m-p/4333347#M172046</guid>
      <dc:creator>Ben_jamin</dc:creator>
      <dc:date>2024-12-17T15:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a flag using a value and two date fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-flag-using-a-value-and-two-date-fields/m-p/4333384#M172049</link>
      <description>&lt;P&gt;You can create a calculated column like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Multiple service orders in a contract =
VAR NumOrders =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        ALLEXCEPT (
            'Table',
            'Table'[Serial #],
            'Table'[Contract start date],
            'Table'[Contract end date]
        )
    )
VAR Result =
    IF ( NumOrders &amp;gt; 1, "Yes", "No" )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 17 Dec 2024 15:33:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-flag-using-a-value-and-two-date-fields/m-p/4333384#M172049</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-12-17T15:33:27Z</dc:date>
    </item>
  </channel>
</rss>

