Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in BI by (11.1k points)

How can I set business days on two dates 

And I am using the following query

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 

How can I do that?

1 Answer

0 votes
by (22.5k points)
edited by

To do that use the measure

=SWITCH(WEEKDAY([CalendarDate]),7,FALSE(),1,FALSE(),TRUE())

 Want to learn more about Power Bi, Come & join: power bi tutorial 

Related questions

0 votes
1 answer
asked Jan 17, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...