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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Microsoft Employee
Microsoft 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.