Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
erezbenmoshe
Advocate I
Advocate I

Number of Days between two days excluding weekends

Hello,

 

I found a lot of suggestions about the subject and used the following:

 

IfWorkDay = SWITCH('Calendar'[DayOFWeekNum],
6,0,
7,0,
1)

 

Broad to Exc =

CALCULATE(SUM('Calendar'[IfWorkDay]),

                        DATESBETWEEN('Calendar'[Date],DeliveriesStats[BroadCast Date],DeliveriesStats[Excecution Date]))

 

The problem I have is that the result of the calculation for same day delivery on a weekday is 1 where it should be 0.

 

Please help ...

 

Thanks,

Erez

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @erezbenmoshe

 

Your calculated column “Broad to Exc” seems correct. It’s better to share your file for us. Also, here is the reference for you to try another way to calculate workdays.

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.