Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to calculate the Working Days in a month selected by the user.
I know that the function networkdays(start_date,end_date) does that, but I think I would need to calculate the start date and end date of the selected month and pass them as parameters to the networkdays function. I also know that I can use the MonthStart and MonthEnd functions. What I don't know is how to perform this after the user has selected a month in a multibox object.
Thanks,
wgonzlez
Hi,
Use like this,
=MonthStart(Min(Date)) and MonthEnd(Max(Date)) as the parameters to the networkdays
Hope it helps
Hi,
Use like this,
=MonthStart(Min(Date)) and MonthEnd(Max(Date)) as the parameters to the networkdays
Hope it helps
Hello!!
My suggestion will be to add a dimension for those dates flagging the working days as 1, and then do a count (or sum if you use the flag as the number 1) for the selection period
Sum({<WorkingDayFlag = {1}>}FieldToAggregate)
Count({<WorkingDayFlag = {1}>} SelectedPeriod)
On you load script you can go like this
if(Weekday(date) = 'Mon' or Weekday(date) = 'Tue' or Weekday(date) = 'Wed' or Weekday(date) = 'Thu" or Weekday(date) = 'Fri",1,0) as WorkingDayFlag
Every working day will be associated to a 1 value
Hope this helps, I have to run to a meeting so I will calrify if needed
Regards,
Thank you guys! I used Mayil's suggestion, since it's a shorter way. Thank you both!