<?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: Net Work Days in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/2362368#M820</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;, opening this thread. I have this same scenario, however, I need to exclude weekends. May I ask for your inputs/help on this? Thank you.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 26 Feb 2022 16:36:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-26T16:36:39Z</dc:date>
    <item>
      <title>Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362#M109</link>
      <description>&lt;P&gt;Recreates the NETWORKDAYS function from Excel with some bonus measures and one that needs fixed or demonstrates a bug/documentation glitch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NetWorkDays calculates the number of days between two dates sans weekends.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NetWorkDays = 
VAR Calendar1 = CALENDAR(MAX(NetWorkDays[created date]),MAX(NetWorkDays[review date]))
VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))
RETURN COUNTX(FILTER(Calendar2,[WeekDay]&amp;lt;6),[Date])&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DaysHoursMinutes provides a nice display format for the number of days, hours and minutes between two dates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DaysHoursMinutes = DATEDIFF(MAX(NetWorkDays[created date]),MAX(NetWorkDays[review date]),DAY) &lt;BR /&gt;&amp;amp; " Days " &amp;amp; HOUR(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1)) &lt;BR /&gt;&amp;amp; " Hours " &amp;amp; MINUTE(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1)) &amp;amp; " Minutes"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NetWorkDaysHoursMinutes displays net work days in a nice display format&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NetWorkDaysHoursMinutes = &lt;BR /&gt;VAR Calendar1 = CALENDAR(MAX(NetWorkDays[created date]),MAX(NetWorkDays[review date]))&lt;BR /&gt;VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))&lt;BR /&gt;RETURN COUNTX(FILTER(Calendar2,[WeekDay]&amp;lt;6),[Date]) &amp;amp; " Days " &amp;amp; &lt;BR /&gt;HOUR(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1)) &amp;amp; " Hours " &lt;BR /&gt;&amp;amp; MINUTE(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1)) &amp;amp; " Minutes"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, this one tries incorporates holidays. While the documentation indicates that you can use DATE, you cannot. But the following code does work to remove December 25th as a work day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NetWorkDaysHolidays = &lt;BR /&gt;VAR Calendar1 = CALENDAR(MAX(NetWorkDays[created date]),MAX(NetWorkDays[review date]))&lt;BR /&gt;//VAR Holidays = DATATABLE("Date",DATETIME,{{}})&lt;BR /&gt;VAR Holidays1 = DATATABLE("Date",DATETIME,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"12/25/2017 12:00:00 AM"}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; })&lt;BR /&gt;VAR Calendar2 = EXCEPT(Calendar1,Holidays1)&lt;BR /&gt;VAR Calendar3 = ADDCOLUMNS(Calendar2,"WeekDay",WEEKDAY([Date],2))&lt;BR /&gt;RETURN COUNTX(FILTER(Calendar3,[WeekDay]&amp;lt;6),[Date])&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Finally, finally, this one is Holidays with days, hours and mintues:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NetWorkDaysHolidaysDaysHoursMinutes = 
VAR Calendar1 = CALENDAR(MAX(NetWorkDays[created date]),MAX(NetWorkDays[review date]))
//VAR Holidays = DATATABLE("Date",DATETIME,{{}})
VAR Holidays1 = DATATABLE("Date",DATETIME,
    {
        {"12/25/2017 12:00:00 AM"}
    })
VAR Calendar2 = EXCEPT(Calendar1,Holidays1)
VAR Calendar3 = ADDCOLUMNS(Calendar2,"WeekDay",WEEKDAY([Date],2))
RETURN COUNTX(FILTER(Calendar3,[WeekDay]&amp;lt;6),[Date]) &amp;amp; " Days " &amp;amp; &lt;BR /&gt;HOUR(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1)) &amp;amp; " Hours " &lt;BR /&gt;&amp;amp; MINUTE(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1)) &amp;amp; " Minutes"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiYjFhNWIwMmMtMTlhOC00YjNkLTlmNmMtMGYxMjcwOWQzZWRkIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 12:47:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362#M109</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-08-24T12:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400230#M133</link>
      <description>&lt;P&gt;Thanks for your help,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NetWorkDays = &lt;BR /&gt;VAR Calendar1 = CALENDAR(MAX(KontElemente[Datum der Besichtigung]);MAX(today())&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn´d understand the part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))&lt;BR /&gt;RETURN COUNTX(FILTER(Calendar2,[WeekDay]&amp;lt;6),[Date])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can u help me out?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:29:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400230#M133</guid>
      <dc:creator>BachFel</dc:creator>
      <dc:date>2018-04-19T14:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400244#M134</link>
      <description>&lt;P&gt;If you are referring to the VAR Calendar2 part, what that does is adds a column to the temp calendar table using the WEEKDAY function with the parameter 2, which essentially codes things M=1, T=2, W=3, Th=4, F=5, Sa=6, Su=7. So, the next step, the RETRUN filters out anything 6 or 7 to exclude Saturdays and Sundays.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:35:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400244#M134</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-04-19T14:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400252#M135</link>
      <description>&lt;P&gt;&lt;img /&gt;It´s not working. Guess I´m the problem and not the formula&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:39:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400252#M135</guid>
      <dc:creator>BachFel</dc:creator>
      <dc:date>2018-04-19T14:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400328#M137</link>
      <description>&lt;P&gt;You are missing a ) at the end of your line beginning with VAR Calendar1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 15:47:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/400328#M137</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-04-19T15:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/531372#M233</link>
      <description>&lt;P&gt;Very nice scripts, but what if I want to aggregate&amp;nbsp;the network days by another column from the NetWorkDays table?&lt;/P&gt;
&lt;P&gt;Eg. if I add a "Name" column to the NetWorkDays table and add John and Jane Doe and one more row:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When using the NetWorkDays measure it works on a row by row level, but if I try to aggregate&amp;nbsp;by the 'Name' column the measure seems to be incorrect:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Any idea why and how to fix it?&lt;/P&gt;
&lt;P&gt;I have included the modified PBIX file.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 11:37:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/531372#M233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-02T11:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/594743#M283</link>
      <description>&lt;P&gt;What if I have some&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;empty fields?&lt;/P&gt;
&lt;P&gt;In my query the "review date" for ongoing item is blank. and this measure provide gives me an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't wan't to filther them out. I still want to show all row in my dashboard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 19:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/594743#M283</guid>
      <dc:creator>GonzaloS</dc:creator>
      <dc:date>2019-01-03T19:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/608861#M286</link>
      <description>&lt;P&gt;Hi Greg, i am using a direct query and it throws up an error saying countx is not&amp;nbsp;allowed as part of calculated columns dax expressions on Direct Query Mode.. Please Help!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 02:09:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/608861#M286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-25T02:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/609275#M287</link>
      <description>&lt;P&gt;Are you sure you are using the formula in a measure and not in a Column? According to this article, COUNTX should work in a measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/analysis-services/tabular-models/dax-formula-compatibility-in-directquery-mode-ssas-2016?view=sql-server-2017" target="_blank"&gt;https://docs.microsoft.com/en-us/sql/analysis-services/tabular-models/dax-formula-compatibility-in-directquery-mode-ssas-2016?view=sql-server-2017&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 11:33:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/609275#M287</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-01-25T11:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/609328#M288</link>
      <description>&lt;P&gt;Hi Greg, &lt;BR /&gt;I am definatly using a measure!&lt;BR /&gt;Below is the Error Message:&lt;BR /&gt;MdxScript(Model) (189, 17) Calculation error in measure 'fact_CRM_Incident'[Business Days Active]: The start date in Calendar function can not be later than the end date.&lt;BR /&gt;&lt;BR /&gt;I would like to also reference my holiday flag column which is a&amp;nbsp;Yes/No field in my dim_date table.&lt;/P&gt;
&lt;P&gt;On another note the Closed on date column&amp;nbsp;contains blanks if a ticket is in an&amp;nbsp;"active" or Open state in which case the business days calc should continue to count till current day until a closed date is added in the dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate the help mate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 12:59:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/609328#M288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-25T12:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/689978#M342</link>
      <description>&lt;P&gt;Is there a way to calculate difference between Today() and a given date?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 15:16:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/689978#M342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-13T15:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/690089#M343</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; - Sure, you could do something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NetWorkDays = 
VAR Calendar1 = CALENDAR(TODAY(),[Any Given Date])
VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))
RETURN COUNTX(FILTER(Calendar2,[WeekDay]&amp;lt;6),[Date])&lt;/PRE&gt;
&lt;P&gt;If necessary, reverse the parameters for the CALENDAR function.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 19:11:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/690089#M343</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-05-13T19:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/690740#M344</link>
      <description>&lt;P&gt;Thanks &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; this works like a charm.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 13:03:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/690740#M344</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-14T13:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/741546#M360</link>
      <description>&lt;P&gt;I am receiving the same error. Did you ever figure out the solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 21:16:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/741546#M360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T21:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/749127#M362</link>
      <description>&lt;P&gt;I infact did i used Greg's solution and created another measure to calculate weekends and holidays and subtracted from the above solution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am receiving the same error. Did you ever figure out the solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 14:31:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/749127#M362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-25T14:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/831742#M395</link>
      <description>&lt;P&gt;Sorry to re-open an old thread, but I'm not getting the right answer for the number of days using the COUNTX function in the &lt;SPAN&gt;NetWorkDaysHoursMinutes measure&lt;/SPAN&gt;. If I have a start date of 10/11/2019 and an end date of 10/12/2019, depending on the start and end times, it could be 0 hours or 1 hour. E.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10/11/2019 11:00 to 10/12/2019 9:00 should return "0 Days 22 hours 0 minutes", but it returns "1 Day 22 hours 0 minutes"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to fix this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 20:38:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/831742#M395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-29T20:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/831964#M396</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;, Ahhhh, the boundary cases. Glad you did re-open the thread. Try this variation out, should account for the boundary case that you specify and frankly cleans up the code a bit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NetWorkDaysHoursMinutes = 
VAR Calendar1 = CALENDAR(MAX(NetWorkDays[created date]),MAX(NetWorkDays[review date]))
VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))
VAR Days = COUNTX(FILTER(Calendar2,[WeekDay]&amp;lt;6),[Date])
VAR Hours = HOUR(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1))
VAR Minutes = MINUTE(MOD(MAX(NetWorkDays[review date]) - MAX(NetWorkDays[created date]),1))
VAR NetWorkDaysHoursMinutes = 
    SWITCH(TRUE(),
        Days = 1 &amp;amp;&amp;amp; HOUR(MAX(NetWorkDays[review date])) &amp;lt; HOUR(MAX(NetWorkDays[created date])),
            "0 Days " &amp;amp; Hours &amp;amp; " Hours " &amp;amp; Minutes &amp;amp; " Minutes",
        Days &amp;amp; " Days " &amp;amp; Hours &amp;amp; " Hours " &amp;amp; Minutes &amp;amp; " Minutes"
    )
RETURN NetWorkDaysHoursMinutes &lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 30 Oct 2019 02:23:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/831964#M396</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-10-30T02:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/836449#M398</link>
      <description>&lt;P&gt;Based on your "NetWorkDaysHoursMinutes"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using MAX(TODAY()) but it didn't work, I used MIN and MAX.&amp;nbsp; However, I am getting text (Days Hours Minutes) and cannot change the format to whole number.&lt;/P&gt;
&lt;DIV id="tinyMceEditorJadnerb_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Nov 2019 16:50:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/836449#M398</guid>
      <dc:creator>Jadnerb</dc:creator>
      <dc:date>2019-11-04T16:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/943505#M414</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt; &amp;nbsp; I tried using your formula early on, but it would not allow me since I have some Ship Dates that start before Due Date. &amp;nbsp;&amp;nbsp; The error message said the formula could not allow for that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 21:43:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/943505#M414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-21T21:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Net Work Days</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/943919#M415</link>
      <description>&lt;P&gt;Oh, that would be the CALENDAR function. You would just have to create an IF statement to check which date is larger or smaller and then create your CALENDAR appropriately. Like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NetWorkDays = 
VAR __CreatedDate = MAX(NetWorkDays[created date])
VAR __ReviewDate= MAX(NetworkDays[review date])
VAR Calendar1 = 
  IF(
    __CreatedDate &amp;lt; __ReviewDate,
    CALENDAR(__CreatedDate,__ReviewDate),
    CALENDAR(__ReviewDate,__CreatedDate),
  )
VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2))
RETURN COUNTX(FILTER(Calendar2,[WeekDay]&amp;lt;6),[Date])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 17:15:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/943919#M415</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-02-22T17:15:40Z</dc:date>
    </item>
  </channel>
</rss>

