Intellipaat 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())

Intellipaat provides a complete Course on Power BI, Enroll now.

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

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...