I have a burn up report that runs fine in SSRS 2005. This report excludes weekends. The MDX code block that does that is:
{FILTER([Date].[Date].[Date].ALLMEMBERS,
[Date].[Year Week Date].CURRENTMEMBER.Properties( "Day of Week" )<> "0"
AND [Date].[Year Week Date].CURRENTMEMBER.Properties( "Day of Week" ) <> "6")
}
However when I was trying to make this report work on TFS 2010, which is running SSRS 2008, it didn't work. The MDX code block was:
{FILTER([Date].[Date].[Date].ALLMEMBERS,
[Date].[Year - Week - Date Hierarchy].CURRENTMEMBER.Properties( "Day of Week" )<> "0"
AND [Date].[Year - Week - Date Hierarchy].CURRENTMEMBER.Properties( "Day of Week" ) <> "6")
}
I got an error that says "Query (13, 9) The Day of Week dimension attribute was not found." After Googling around with no finding, I opened up the TFS 2010 SSAS database. Guess what, the Date demension doesn't have the "Day of Week" attribute. In TFS 2008 SSAS 2005 the Date dimension has the following attributes:
Date
Day of Month
Day of Week
Day of Year
Month
Month of Year
Week
Week of Year
Year
However, in TFS 2010 SSAS 2008 the Date dimension only has the following attributes:
Date
DateSK
Month
Week
Year
So we have to find out another to exclude the weekends. I used the WTD() function and came up with the following MDX code, which works:
{FILTER([Date].[Date].[Date].ALLMEMBERS,
count(WTD([Date].[Year - Week - Date Hierarchy].CURRENTMEMBER)) <> 1
AND count(WTD([Date].[Year - Week - Date Hierarchy].CURRENTMEMBER)) <> 7
)
}