<?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 calculate business days in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880079#M7488</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;please try this measure and check if it works for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _acno = MAX('Table'[acno date])
VAR _received = MAX('Table'[received date])
VAR _holidays = CALCULATE(COUNT('Calendar'[Date]),FILTER('Calendar','Calendar'[Date]&amp;gt;=_acno &amp;amp;&amp;amp; 'Calendar'[Date]&amp;lt;=_received&amp;amp;&amp;amp;'Calendar'[Flag]=0))
VAR diff = DATEDIFF(_acno,_received,DAY)
RETURN diff-_holidays&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2019 12:13:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-19T12:13:15Z</dc:date>
    <item>
      <title>How to calculate business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880044#M7483</link>
      <description>&lt;P&gt;I have one date universal date table that is from 1900-01-01 to 9999-12-31. And have one businee day flag.&lt;/P&gt;&lt;P&gt;Business day flag is 1 when we don't have holiday and 0 when we have holidays.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one&amp;nbsp; table which has [acno date] &amp;amp; [received date] and which is not in relationship with date table.&lt;/P&gt;&lt;P&gt;So I want to calculated number of business days between&amp;nbsp;[acno date] &amp;amp; [received date].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For e.g&lt;/P&gt;&lt;P&gt;[acno date] =2019-01-01&amp;nbsp; &amp;amp; [received date]=2019-01-31&lt;/P&gt;&lt;P&gt;so total calender days=31 and business days=31-8=23&lt;/P&gt;&lt;P&gt;where for 8 =days(weekends) business flag is 0.&amp;nbsp; so we worked for 23 days only.&lt;/P&gt;&lt;P&gt;Is there any way we can calculate business days for each&amp;nbsp;[acno date] &amp;amp; [received date]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 11:35:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880044#M7483</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-19T11:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880079#M7488</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;please try this measure and check if it works for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _acno = MAX('Table'[acno date])
VAR _received = MAX('Table'[received date])
VAR _holidays = CALCULATE(COUNT('Calendar'[Date]),FILTER('Calendar','Calendar'[Date]&amp;gt;=_acno &amp;amp;&amp;amp; 'Calendar'[Date]&amp;lt;=_received&amp;amp;&amp;amp;'Calendar'[Flag]=0))
VAR diff = DATEDIFF(_acno,_received,DAY)
RETURN diff-_holidays&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 12:13:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880079#M7488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-19T12:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880089#M7489</link>
      <description>&lt;P&gt;it will give you same output. Acno_date and received_Date are columns having multiple values.&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;Acno_date|received_Date|Business day&lt;/P&gt;&lt;P&gt;2019-01-01|2019-01-15| 11&lt;/P&gt;&lt;P&gt;2019-07-01|2019-01-15| 6&lt;/P&gt;&lt;P&gt;2019-01-01|2019-01-31| 23&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;... so on&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 12:25:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880089#M7489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-19T12:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880130#M7493</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Why do you think It will produce same output. Please refer below picture. I have created a flag in calendar table which returns zero for holidays and 1 for working days&lt;/P&gt;&lt;P&gt;Then I have another table in which I have acno and received date. Please let me know if this is not the expected result.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 13:08:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880130#M7493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-19T13:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880172#M7494</link>
      <description>&lt;P&gt;sorry i haven't added that condition. Thanks for help.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 13:54:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880172#M7494</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-19T13:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880224#M7495</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; how it can be done with column? not measure&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 14:34:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880224#M7495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-19T14:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880874#M7526</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Please create a calculated column as per below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;WorkingDays = 
VAR _holidays = CALCULATE(COUNT('Calendar'[Date]),FILTER('Calendar','Calendar'[Date]&amp;gt;='Table'[Acno] &amp;amp;&amp;amp; 'Calendar'[Date]&amp;lt;='Table'[Received]&amp;amp;&amp;amp;'Calendar'[Flag]=0))
VAR _days = DATEDIFF('Table'[Acno],'Table'[Received],DAY)
RETURN _days-_holidays&lt;/LI-CODE&gt;&lt;P&gt;Please let me know if you have any question. if it helps feel free to hit kudos button.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 04:17:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-business-days/m-p/880874#M7526</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-20T04:17:04Z</dc:date>
    </item>
  </channel>
</rss>

