Hi Todd,
That certainly helps - I was asking about the attribute because that
might be useful in an MDX script scoped calculation. Anyway, what I came
up with so far is rather complex-looking, and may only work at the day
and week levels.
At the month level, if the current month has 5 weeks, does the 4th week
of the previous month have to be extrapolated out to 5 weeks as well?
(
iif(Rank(Ancestor([Time].[Fiscal Time].CurrentMember,
[Time].[Fiscal Time].[Fiscal Week]),
Descendants(Ancestor(
[Time].[Fiscal Time].CurrentMember,
[Time].[Fiscal Time].[Fiscal Month]),
[Time].[Fiscal Time].[Fiscal Week])) <= 4,
PeriodsToDate
(
[Time].[Fiscal Time].[Fiscal Month],
ParallelPeriod([Time].[Fiscal Time].[Fiscal Month])
),
{Ancestor([Time].[Fiscal Time].CurrentMember,
[Time].[Fiscal Time].[Fiscal Month]).PrevMember,
Head(Descendants(ClosingPeriod(
[Time].[Fiscal Time].[Fiscal Week],
Ancestor([Time].[Fiscal Time].CurrentMember,
[Time].[Fiscal Time].[Fiscal Month]).PrevMember),
[Time].[Fiscal Time].CurrentMember.Level),
Rank([Time].[Fiscal Time].CurrentMember,
Descendants(Ancestor(
[Time].[Fiscal Time].CurrentMember,
[Time].[Fiscal Time].[Fiscal Month]),
[Time].[Fiscal Time].CurrentMember.Level))
- Descendants(Ancestor(
[Time].[Fiscal Time].CurrentMember,
[Time].[Fiscal Time].[Fiscal Month]).PrevMember,
[Time].[Fiscal Time].CurrentMember.Level).Count)}))
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***