Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,@everyone
I wanted to display total working days by month.
I have used below formula for feb month excluding holidays and weekends but it is displaying wrong value.Can you please help
=NetWorkDays(MonthStart(Today(),-1),MonthEnd(Today(),-1),DAY_DATE,WeekDay(DAY_DATE)='Sat' OR WeekDay(DAY_DATE)='Sun')&'WD'
NetWorkDays is already removing Sundays and Saturdays.
Then, if you want to remove specific days (holidays), you need to specify each of them, for example:
NetWorkDays(StartingDate,EndingDate,'04-07-2023','23-11-2023') to remove the 4th of July and the 23rd of November.
Hi @vincent_ardiet_ what if we don't know the Exact holidays Date in that case what I have to mention?
Note: I have Holiday Field in my Data
If you have holidays in a field of your datamodel, you can try to generate the parameters list, for example:
=NetWorkDays(YearStart(Today()),Today(),$(=Concat({1}Distinct Num(HOLIDAY_DATE),',')))
This Formula is working for yearstart to till today but i wanted to display each and everymonth like January total working days and feb total working days.
This was an example.
If you want to do this, you need to be more specific, this is not very clear. What are your fields, tables, in which context are you going to display this?
Sorry About that i have 12 tables which contains from jan to dec each table has Wee,WeekDay,DayOfmonth,WorkingDuration fields. at the bottom of the tables i need display total working Days excluding holiday in text object for each month
So you will hardcode 12 expressions right?
Create a variable "MonthlyNetWorkDays" like this:
=NetWorkDays(MakeDate(Year(Today()),$1),MonthEnd(MakeDate(Year(Today()),$1)),$(=Concat({1}Distinct Num(HOLIDAY_DATE),',')))
And then use $(MonthlyNetWorkDays(1)) for Jan networkdays, $(MonthlyNetWorkDays(2)) for Feb...