<?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: Calculate average working days between two dates, from a calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/876730#M7380</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, this appears to have fixed it! The calculation returns a blank if there is no end date. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2019 20:26:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-16T20:26:10Z</dc:date>
    <item>
      <title>Calculate average working days between two dates, from a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/875719#M7349</link>
      <description>&lt;P&gt;I'm currently using the following equation to calculate the total working days between two dates:&lt;/P&gt;&lt;PRE&gt;Total Working Days Column = 
SUMX (
    FILTER (
        'Calendar',
        'Calendar'[Date] &amp;gt;= Tasks[Task Start Date]
            &amp;amp;&amp;amp; 'Calendar'[Date] &amp;lt;= Tasks[Task End Date]
    ),
    'Calendar'[isWorkDay]
)&lt;/PRE&gt;&lt;P&gt;Where the table &lt;STRONG&gt;Calendar&lt;/STRONG&gt;, is a table with all dates listed and a column of&lt;STRONG&gt; isWorkDay&lt;/STRONG&gt;, to indicate if it is Mon-Fri and not Sat or Sun.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This calculation is working for each row, except for the case when my &lt;STRONG&gt;Task End Date&lt;/STRONG&gt;&amp;nbsp;is an empty field.&lt;BR /&gt;&lt;BR /&gt;Instead of returning NULL for the &lt;STRONG&gt;Total Workday Days Column&lt;/STRONG&gt;, I'm receiving a random high value like 5042 or something similar (when instead it should not be able to calculate it because there is only a start date and no end date). I would like to receive a NULL or empty value so that when I calculate an average on my &lt;STRONG&gt;Total Working Days Column&lt;/STRONG&gt;, I get an accurate number that excludes my nulls.&amp;nbsp; Is there a way to add that into my column calculation or do I need to use some other filtering method?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 01:44:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/875719#M7349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-16T01:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average working days between two dates, from a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/875927#M7353</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Working Days Column = 
(
SUM ('Calendar'[isWorkDay]),
    FILTER (
        'Calendar',
        'Calendar'[Date] &amp;gt;= Tasks[Task Start Date]
            &amp;amp;&amp;amp; 'Calendar'[Date] &amp;lt;= Tasks[Task End Date]
    ),
    NOT(ISBLANK(Tasks[Task End Date]))
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#ababab"&gt;do not hesitate to give a kudo to useful posts and mark solutions as solution&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 07:10:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/875927#M7353</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2019-12-16T07:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average working days between two dates, from a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/875934#M7354</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; I'm not able to reproduce the scenario. Please refer image. Can you please share some dummy data or else try to wrap your formula in if function as below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Working Days Column = IF(Tasks[Task End Date]=BLANK(),BLANK(),
SUMX (
    FILTER (
        'Calendar',
        'Calendar'[Date] &amp;gt;= Tasks[Task Start Date]
            &amp;amp;&amp;amp; 'Calendar'[Date] &amp;lt;= Tasks[Task End Date]
    ),
    'Calendar'[isWorkDay]
))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 07:12:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/875934#M7354</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-16T07:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average working days between two dates, from a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/876726#M7379</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;, That function returned an error message stating that too many arguments were sent so I was not able to run it.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 20:24:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/876726#M7379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-16T20:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average working days between two dates, from a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/876730#M7380</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;, this appears to have fixed it! The calculation returns a blank if there is no end date. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 20:26:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-working-days-between-two-dates-from-a/m-p/876730#M7380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-16T20:26:10Z</dc:date>
    </item>
  </channel>
</rss>

