Hi guys,
I have and MDX issue and I hope you can help me. Actually in my data I have 1 Date Column.
However I am using it for 2 different Dimensions (Reporting Period and Comparison Period).
Now I have Measures (f.ex. Revenue) that are connected to only 1 Date Dimension.
I implemented it by using MDX, f.ex. based on the Revenue Measure:
Revenue Measure based on Reporting Period:
CREATE MEMBER CURRENTCUBE.[Measures].[RP_Revenue]
AS
([T-DIM ServiceDateReporting].[ServiceDateReporting].[All],[Measures].[Revenues])
,
DISPLAY_FOLDER = 'ReportingPeriod';
and the same Revenue Measure based on the Comparison Period:
CREATE MEMBER CURRENTCUBE.[Measures].[CP_Revenue]
AS
([T-DIM ServiceDateComparison].[ServiceDateComparison].[All],[Measures].[Revenues])
,
DISPLAY_FOLDER = 'ComparisonPeriod';
Actually the implementation works really well.
In Excel I can use both Measure and both Date Hierarchies as Filter and they are only connected to one Date Filter. So if I filter the Reporting Period to Dez. 2018 RP_Revenue does show the data from Dez. Additionally I can filter the Comparison Period to
May 2018 and the CP_Revenue does show the data for May 2018.
So far so good, however I am not able to use YTD cumulation anymore.
I am creating a Cumulation Member:
CREATE MEMBER CURRENTCUBE.[Cumulation].[Cumulation].[YTD]
AS NULL
,VISIBLE = 1;
Now I am scoping the YTD Member:
SCOPE([Cumulation].[Cumulation].[YTD]);
SCOPE([T-DIM ServiceDateReporting].[T-DIM ServiceDateReporting].MEMBERS);
THIS=Aggregate({[Cumulation].[Cumulation].[Cum].&[1]}*
{PeriodsToDate(
[T-DIM ServiceDateReporting].[T-DIM ServiceDateReporting].[Year],
[T-DIM ServiceDateReporting].[T-DIM ServiceDateReporting].CurrentMember
)});
END SCOPE;
SCOPE([T-DIM ServiceDateComparison].[ServiceDateComparison].Members);
THIS=Aggregate({[Cumulation].[Cumulation].[Cum].&[1]}*
{PeriodsToDate(
[T-DIM ServiceDateComparison].[ServiceDateComparison].[Year],
[T-DIM ServiceDateComparison].[ServiceDateComparison].CurrentMember
)});
END SCOPE;
END SCOPE;
Actually YTD is working for the first SCOPE, ServiceDateReporting but the second SCOPE statement is not working (ServiceDateComparison).
How can I implement the YTD cumulation that the measures using the reporting period are cumulated based on the reporting date Hierarchie dimension and measures using the comparison period are cumulated based on the comparison date Hierarchie dimension?
Thanks a lot!!
Elchfighter