<?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: Only using one of two dates for a calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4606773#M176354</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="742052" data-lia-user-login="lynnzrae" class="lia-mention lia-mention-user"&gt;lynnzrae&lt;/a&gt;&amp;nbsp;Create a calculated column to identify the earliest application date for each project:&lt;/P&gt;
&lt;P&gt;Earliest Application Date = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;MIN(TPermitMetrics[Application Received; Complete Date]),&lt;BR /&gt;ALLEXCEPT(TPermitMetrics, TPermitMetrics[Permiit UID])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify your existing DAX formula to use this earliest application date:&lt;/P&gt;
&lt;P&gt;# of Days in Applicant Cycle Time = &lt;BR /&gt;IF(&lt;BR /&gt;ISBLANK(TPermitMetrics[BRG-2 Application Deemed Complete; Complete Date]),&lt;BR /&gt;DATEDIFF(TPermitMetrics[Earliest Application Date], TODAY(), DAY),&lt;BR /&gt;DATEDIFF(TPermitMetrics[Earliest Application Date], TPermitMetrics[BRG-2 Application Deemed Complete; Complete Date], DAY)&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2025 11:05:28 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2025-03-12T11:05:28Z</dc:date>
    <item>
      <title>Only using one of two dates for a calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4606739#M176351</link>
      <description>&lt;P&gt;I am trying to find the # of days for an application to process.&amp;nbsp; For the same project, an applicant may submint their application more than once.&amp;nbsp; When that happens I only want to use the earliest of the two dates in my calculation.&amp;nbsp; Right now it will take the sum of both when I create a visual with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my data to include the dax column I created to find the # of days in applicant cycle time.&amp;nbsp; When I create a bar graph to visualize it adds the 62 and the 316 together and the bargraph calculates this application as being in progress for 378 days.&amp;nbsp; I want it to only show as being active for 316 days (the earliest of the two dates).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case it helps the dax I created to find the # of days in applicant cycle time is&amp;nbsp;&lt;/P&gt;&lt;P&gt;# of Days in Applicant Cycle Time = IF(&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ISBLANK(TPermitMetrics[BRG-2 Application Deemed Complete; Complete Date]),&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATEDIFF(TPermitMetrics[Application Received; Complete Date], TODAY(), DAY),&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATEDIFF(TPermitMetrics[Application Received; Complete Date],TPermitMetrics[BRG-2 Application Deemed Complete; Complete Date], DAY)&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should I change the dax or would it be a filter for the visual of some sort?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Permiit UID&lt;/TD&gt;&lt;TD&gt;Project Title&lt;/TD&gt;&lt;TD&gt;Application Received; Complete Date&lt;/TD&gt;&lt;TD&gt;BRG-2 Application Deemed Completae: Complete Date&lt;/TD&gt;&lt;TD&gt;# of days in applicant cycle time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9122&lt;/TD&gt;&lt;TD&gt;Projet Title A&lt;/TD&gt;&lt;TD&gt;8/30/2024&lt;/TD&gt;&lt;TD&gt;10/31/2024&lt;/TD&gt;&lt;TD&gt;62&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9122&lt;/TD&gt;&lt;TD&gt;Projet Title A&lt;/TD&gt;&lt;TD&gt;12/20/2023&lt;/TD&gt;&lt;TD&gt;10/31/2024&lt;/TD&gt;&lt;TD&gt;316&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 12 Mar 2025 10:35:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4606739#M176351</guid>
      <dc:creator>lynnzrae</dc:creator>
      <dc:date>2025-03-12T10:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Only using one of two dates for a calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4606773#M176354</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="742052" data-lia-user-login="lynnzrae" class="lia-mention lia-mention-user"&gt;lynnzrae&lt;/a&gt;&amp;nbsp;Create a calculated column to identify the earliest application date for each project:&lt;/P&gt;
&lt;P&gt;Earliest Application Date = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;MIN(TPermitMetrics[Application Received; Complete Date]),&lt;BR /&gt;ALLEXCEPT(TPermitMetrics, TPermitMetrics[Permiit UID])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify your existing DAX formula to use this earliest application date:&lt;/P&gt;
&lt;P&gt;# of Days in Applicant Cycle Time = &lt;BR /&gt;IF(&lt;BR /&gt;ISBLANK(TPermitMetrics[BRG-2 Application Deemed Complete; Complete Date]),&lt;BR /&gt;DATEDIFF(TPermitMetrics[Earliest Application Date], TODAY(), DAY),&lt;BR /&gt;DATEDIFF(TPermitMetrics[Earliest Application Date], TPermitMetrics[BRG-2 Application Deemed Complete; Complete Date], DAY)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 11:05:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4606773#M176354</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-03-12T11:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Only using one of two dates for a calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4606825#M176355</link>
      <description>&lt;P&gt;that works great.&amp;nbsp; Should I do some sort of distinct count dax as well to make sure that the project is only counted once in my visuals?&amp;nbsp; right now the advice provided solves the two different set of date issues but it still sums the two rows together when I try to visualize the data.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 11:33:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4606825#M176355</guid>
      <dc:creator>lynnzrae</dc:creator>
      <dc:date>2025-03-12T11:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Only using one of two dates for a calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4607976#M176391</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="742052" data-lia-user-login="lynnzrae" class="lia-mention lia-mention-user"&gt;lynnzrae&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample pbix file(see &lt;EM&gt;&lt;STRONG&gt;the attachment&lt;/STRONG&gt;&lt;/EM&gt;), please check if it can return your expected result.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag = 
VAR _mindate =
    CALCULATE (
        MIN ( 'TPermitMetrics'[Application Received; Complete Date] ),
        FILTER (
            'TPermitMetrics',
            'TPermitMetrics'[Permiit UID] = EARLIER ( 'TPermitMetrics'[Permiit UID] )
        )
    )
RETURN
    IF ( 'TPermitMetrics'[Application Received; Complete Date] = _mindate, "Y" )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 06:37:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-using-one-of-two-dates-for-a-calculation/m-p/4607976#M176391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-13T06:37:27Z</dc:date>
    </item>
  </channel>
</rss>

