<?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 determine the contract is active or not use start and end date? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-determine-the-contract-is-active-or-not-use-start-and-end/m-p/3992242#M154942</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="568540" data-lia-user-login="YDG" class="lia-mention lia-mention-user"&gt;YDG&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample data to solve your problem, you can follow the steps below:&lt;/P&gt;
&lt;P&gt;1.Add an index column.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2.Add new measure for each date, here is an example for 2023/1/31:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;2023/1/31 = 
VAR _start_date =
    SELECTEDVALUE ( 'Contract Database'[Start Date] )
VAR _end_date =
    SELECTEDVALUE ( 'Contract Database'[End Date] )
VAR _date_by_month =
    CALCULATE (
        MAX ( 'Date Table'[Date] ),
        FILTER ( 'Date Table', 'Date Table'[Index] = 1 )
    )
VAR _acv =
    IF ( _start_date &amp;lt; _date_by_month &amp;amp;&amp;amp; _end_date &amp;gt; _date_by_month, 1, 0 )
RETURN
    IF ( _acv = 1, SUM ( 'Contract Database'[ACV] ), 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;3.Add a total measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total = [2023/1/31]+[2023/2/28]+[2023/3/31]+[2023/4/30]+[2023/5/31]+[2023/6/30]+[2023/7/31]&lt;/LI-CODE&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2024 02:31:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-06-14T02:31:16Z</dc:date>
    <item>
      <title>How to determine the contract is active or not use start and end date?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-determine-the-contract-is-active-or-not-use-start-and-end/m-p/3991910#M154914</link>
      <description>&lt;P&gt;Hi everyone, I am doing an ACV analysis and want to mimic what we have in Excel.&lt;/P&gt;&lt;P&gt;We have a table which is the contract dataset.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in Excel, we have a formula like below. By comparing to Start and End date, we determine if the contract is active in a specific month. If it's active, it has the ACV in that month.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In power BI, if I have the Contract Database and A Date table by month, how can I calculate if the contract is active in a specific month and sum up the ACV?&lt;/P&gt;&lt;P&gt;And if anyone is doing an ACV analysis in Power BI, do you have any suggestion?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 22:21:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-determine-the-contract-is-active-or-not-use-start-and-end/m-p/3991910#M154914</guid>
      <dc:creator>YDG</dc:creator>
      <dc:date>2024-06-13T22:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the contract is active or not use start and end date?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-determine-the-contract-is-active-or-not-use-start-and-end/m-p/3992242#M154942</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="568540" data-lia-user-login="YDG" class="lia-mention lia-mention-user"&gt;YDG&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample data to solve your problem, you can follow the steps below:&lt;/P&gt;
&lt;P&gt;1.Add an index column.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2.Add new measure for each date, here is an example for 2023/1/31:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;2023/1/31 = 
VAR _start_date =
    SELECTEDVALUE ( 'Contract Database'[Start Date] )
VAR _end_date =
    SELECTEDVALUE ( 'Contract Database'[End Date] )
VAR _date_by_month =
    CALCULATE (
        MAX ( 'Date Table'[Date] ),
        FILTER ( 'Date Table', 'Date Table'[Index] = 1 )
    )
VAR _acv =
    IF ( _start_date &amp;lt; _date_by_month &amp;amp;&amp;amp; _end_date &amp;gt; _date_by_month, 1, 0 )
RETURN
    IF ( _acv = 1, SUM ( 'Contract Database'[ACV] ), 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;3.Add a total measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total = [2023/1/31]+[2023/2/28]+[2023/3/31]+[2023/4/30]+[2023/5/31]+[2023/6/30]+[2023/7/31]&lt;/LI-CODE&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 02:31:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-determine-the-contract-is-active-or-not-use-start-and-end/m-p/3992242#M154942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-14T02:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the contract is active or not use start and end date?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-determine-the-contract-is-active-or-not-use-start-and-end/m-p/3992309#M154948</link>
      <description>&lt;P&gt;Thanks Ada for your solution! this does give me the same result as of the Excel formula. My only concern is that the real dataset contains multiple years' data from 2019 to now and we will keep adding new contracts. Instead of create one measure for each month, is there a way to be able to see the ACV value for any given month if the contract is active? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 03:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-determine-the-contract-is-active-or-not-use-start-and-end/m-p/3992309#M154948</guid>
      <dc:creator>YDG</dc:creator>
      <dc:date>2024-06-14T03:01:53Z</dc:date>
    </item>
  </channel>
</rss>

