Find total working days in a month

mdx
jira
calculatedmembers

#1

Hello,

I am trying to get the total number of working days in a particular month. I am trying to use DateDiffWorkDays but I have to enter dates manually for that. I wish to have it for every month in the year and next year, so adding dates manually to that function is not optimal. Is there any other way to do that? Any help will be appreciated.

Thank you.


#2

Hi,

Your approach using function DateDiffDays() to count working days is correct.
To make this function more flexible and count working days for any Time member (year, quarter, month, week) selected in the report you may use functions StartDate and NextStartDate like this:

DateDiffWorkDays(
  [Time].CurrentHierarchyMember.StartDate,
  [Time].CurrentHierarchyMember.NextStartDate
)

This calculation takes into account holidays listed in eazyBI import options as well.

Best,
Zane / support@eazyBI.com


#3

Thank you very much. I was able to do it in a similar way.