Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bwisealiahmad
Partner - Specialist
Partner - Specialist

Counting working days this week / month

So in an excel sheet there is a column called "Days this week" which counts:


Monday as 1,

Tuesday as 2,

Wednesday as 3


(only Mon-Fri)


++


And another column called Days This Month that also works as a counter of working days from the first day of the month as 1, second as 2 etc. and want this to automatically be done for each month.


I want to create these fields based on a budget date.


I've heard about "Network" days, but not sure how to get to this.


Any tips anyone?

53 Replies
bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Hi,


So I noticed after that holiday dates have been removed from the actual excel sheet there is a difference now. Now it is continuing on those days from previous week and counting on.

Hmm.JPG

These should have started from 1 again seeing as 26th is a holiday, but I thought because those rows were removed it would start again from 1.

sunny_talwar

Can you share the most recent data and app for me to look at?

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Can't share it here 😕 do you have a skype I could add you on?

sunny_talwar

Don't use skype brother.... another way you can share?

Preparing examples for Upload - Reduction and Data Scrambling

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Shame. But ok.

If I add back a row in a copied sheet with 26.12.2016 as a row and date then I get this. So then at least behaves right so it was correct before the data source change.

Hmm.JPG

sunny_talwar

Do you mind if I look at this in the evening with a free mind?

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Yes! Of course. I am going to keep testing in the meanwhile.

sunny_talwar

Okay so I have revised my memory as to what we were doing here..... What I am confused here is that you are saying that you have removed 12/26/2016 frrom your Excel file.... then why does it still show up in your table here?

Capture.PNG

Do you have a seperate master calendar which create all dates for you?

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Hi again,

I've also been thinking here hah and decided to instead of using this excel sheet and refer to it I've created flags for holidays, current week, current month etc, weekend day

that way I can count dates and exclude holidays based on flags and it's based on the master calendar instead of this excel sheet.

The date is showing up because it is being generated by the master calendar script.

sunny_talwar

Flag might be a good idea... because then you can very easily use this part

If(not Match(WeekDay(Date), 'Sun', 'Sat'), If(not Match(Date, MakeDate(2016, 12, 26)), RangeSum(Peek('Day this week'), 1), RangeSum(Peek('Day this week'), 0)), 0) as [Day this week],

to be this (assuming you flag 1 for holiday

If(not Match(WeekDay(Date), 'Sun', 'Sat'), If(not Match(Flag, 1), RangeSum(Peek('Day this week'), 1), RangeSum(Peek('Day this week'), 0)), 0) as [Day this week],

Now, is there still something you are looking for me to help you on? I was not sure after reading your last response