Question

I looked at this topic, Calculating the number of days in a time dimension node - with Grand Total, but can't seem to get it.

I have a Time Dimension; [Invoice Date].

I want to count the number of Work Days in that dimension for a specified time period. I'm new to MDX.

Here's what I have.

Count( Descendants( [Invoice Date].CurrentMember, [Invoice Date].[Work Date].[Work Date] )
)

I'm getting a cube error now.

Was it helpful?

Solution

An easy way to implement this reliably would be to create a physical measure "Day Count". To do this, create a new measure group on the Date dimension table, and define "Day Count" as the Count. On the dimension usage tab, make sure you set a relationship from this measure group to the Invoice Date cube dimension and not the other dimensions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top