title: Calculate the number of business days between two dates in power pivot
body: <p>I am looking for a formula to calculate the number of weekdays/business days between two dates in power pivot.</p>
  
  <p>I do the same in T-SQL using  the following query</p>
  
  <pre><code>DATEDIFF(dd, Date1, GETDATE()) - (DATEDIFF(wk, Date1, GETDATE()) * 2) -
              CASE WHEN DATEPART(dw, Date1) = 1 THEN 1 ELSE 0 END +
              CASE WHEN DATEPART(dw, GETDATE()) = 1 THEN 1 ELSE 0 END END 
  </code></pre>
  
  <p>I am looking for a similar query in <a href="https://en.wikipedia.org/wiki/PowerPivot" rel="nofollow">PowerPivot</a>.</p>