Friday, March 9, 2012

Find number of business days in a month

Hi,

I need to find out the number of business days in a month. I have a column 'IsWorkingDay' in my [Time] table. Can anyone please let me know how to find out number of business days in a given month using MDX query.

Thanks.

The best way to solve this problem is to create a calculated column in DSV which will compute number of working days in a month, and then create attribute related to Month called WorkingDaysCount.

Then in MDX it will look like

WITH MEMBER Measures.X AS Date.WorkingDaysCount.CurrentMember.MemberValue

SELECT X ON 0

, Date.Month.MEMBERS ON 1

From cube

No comments:

Post a Comment