I defined the calc for prior period for sales amount. But is it possible to get last 52 weeks from the current period?
how to define in this calc?
-- PRIOR PERIOD CALCULATIONS
([Time Calculations].[Prior Period]=
IIF(([Date].[Fiscal Hierarchy].currentmember.lag(1),
[Time Calculations].&[ Current Period])=0,null,
([Date].[Fiscal Hierarchy].currentmember.lag(1),
[Time Calculations].&[ Current Period]))
);
If your hierarchy has a week-level, then I believe what you are looking for is this:
Code Snippet
SET [Time Calculations].[Prior Period] AS 'LastPeriods( 52, [Date].[Fiscal Hierarchy].currentmember )This gives you a set of the current week and the previous 52 weeks. Assuming [Date].[Fiscal Hierarchy].currentmember is at week-level.
Best regards
- Jens
No comments:
Post a Comment