<?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 Net Working Days in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982944#M43745</link>
    <description>&lt;P&gt;Got it! Thanks for this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 19:25:34 GMT</pubDate>
    <dc:creator>manojnikam3008</dc:creator>
    <dc:date>2021-07-27T19:25:34Z</dc:date>
    <item>
      <title>Calculate Net Working Days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982567#M43726</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate net working days between two dates that I'am capturing from slicer but somehow i am not getting the expected output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Objective:&amp;nbsp;&lt;/STRONG&gt;I want to capture dates from the slicer and return net working days between that date range + i want to calculate user capacity (i.e per day working hours of user) during that date range &lt;EM&gt;(E.g - If user selects 10 days period in slicer, I want to return 1. Net working Days + 2. Daily working hours x 10 days = 80 + 3. I require this to calculate if user has booked 80 hours during 10 days or not -if less then i will show them Insufficient hours and vice versa)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table name&lt;/STRONG&gt;: Timesheet (62)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Column Name:&lt;/STRONG&gt; Date&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Column Name:&lt;/STRONG&gt; 'Timesheet (62)'[IsWorkingDay]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Slicer&lt;/STRONG&gt; using the [Date] Column.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Measures used&lt;/STRONG&gt;: (this is done to keep it dynamic in nature upon user's selection of the specific date range)&lt;/P&gt;&lt;P&gt;Start date of filter = Capturing Start date of the slicer in using FIRSTDATE function&lt;BR /&gt;End date of filter = Capturing End date of the slicer in using FIRSTDATE function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAX:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;WorkingDays = CALCULATE(COUNTROWS('Timesheet (62)'),DATESBETWEEN('Timesheet (62)'[Date],[Start Date of filter],[End Date of filter]),'Timesheet (62)'[IsWorkingDay]="True")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is it allowed to use measures in this formula, if so then it's not filtering the data. I get the total of 11713 i.e. the toal of all TRUE values from [IsWorkingDay] column.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Appreciate your response on this.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Manoj Nikam&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Jul 2021 15:52:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982567#M43726</guid>
      <dc:creator>manojnikam3008</dc:creator>
      <dc:date>2021-07-27T15:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Net Working Days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982679#M43732</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="279181" data-lia-user-login="manojnikam3008" class="lia-mention lia-mention-user"&gt;manojnikam3008&lt;/a&gt;&amp;nbsp;- with a Date table this becomes really easy.&amp;nbsp;&lt;BR /&gt;The measure is this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Working Days = 
CALCULATE(
    COUNTROWS('Date'),
    'Date'[IsWorkingDay] = TRUE()
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then create another measure to multiply that measure by 8 or whatever to get hours.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AheFG2CwN3xnitRAR6ib1r4N5jmUKA?e=wJhg1h" target="_self"&gt;See the file here for how this works&lt;/A&gt;.&lt;BR /&gt;You'll notice I have filtered the date slicer by valid data in the fact table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Valid Data is just a measure that is COUNTROWS(Timesheets) - if there are records, the slicer will show it. Future and past dates though won't show up.&lt;/P&gt;
&lt;P&gt;If that isn't what you want, please provide more specifics per the info below. But the point is with a good date dimension table, the DAX becomes very easy.&lt;BR /&gt;&lt;BR /&gt;How to get good help fast. Help us help you.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;A href="https://www.sqlbi.com/blog/alberto/2021/01/22/on-how-to-ask-a-technical-question-if-you-really-want-an-answer/" target="_blank" rel="noopener"&gt;How To Ask A Technical Question If you Really Want An Answer&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.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&lt;/A&gt; - Give us a good and concise explanation&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt; - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 16:42:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982679#M43732</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2021-07-27T16:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Net Working Days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982929#M43742</link>
      <description>&lt;P class="lia-align-left"&gt;Thank You! New date table worked.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 19:17:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982929#M43742</guid>
      <dc:creator>manojnikam3008</dc:creator>
      <dc:date>2021-07-27T19:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Net Working Days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982940#M43743</link>
      <description>&lt;P&gt;Perfect&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="279181" data-lia-user-login="manojnikam3008" class="lia-mention lia-mention-user"&gt;manojnikam3008&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Rule of thumb - if your data has dates, create a date table for just this sort of thing. Glad your project is moving forward!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 19:23:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982940#M43743</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2021-07-27T19:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Net Working Days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982944#M43745</link>
      <description>&lt;P&gt;Got it! Thanks for this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 19:25:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Net-Working-Days/m-p/1982944#M43745</guid>
      <dc:creator>manojnikam3008</dc:creator>
      <dc:date>2021-07-27T19:25:34Z</dc:date>
    </item>
  </channel>
</rss>

