WeekDay Calculation in DAX/M code

Hi Team,
My question is, I have to create a column of days difference between the start date column and end date column by making sure the difference doesn’t include the weekends.
The Current columns are 1. Start Date 2. End Date 3. Days Name
This image will give you the visual.

Result - The client needs a new Column - Difference of Days but asked me to make sure the calculation should exclude weekends, meaning saturday and sunday .
Suppose start day is “Thursday” and end day is “Monday” then the result value should be 2, i.e., counting only Friday and Monday. It should not count the start date also. It should start only with following day and not the same day.
The week days are marked as - Sun - 1, Mon - 2…Sat - 7.
Please look into this and help me with DAX or M code whichever is easier to exclude the weekends from the difference calculation.

Thanks
Naresh.

Hi @naresh,

Please refer to this topic for a Power Query approach.

I hope this is helpful

Hello @naresh, just following up if the response from @Melissa help you solve your inquiry?

We’ve noticed that no response has been received from you since a few days ago. In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.