Hi Hrvoje,
Thank you for the detailed reply. I am new to writing MDX scripts and trying to understand the logic and concept.
Based on your suggestion, I modified my measure in the script view as follows. However, I am getting an error message 'The syntax for set is incorrect'.
CREATE MEMBER CURRENTCUBE.[MEASURES].[LY QUANTITY]
AS WITH set [Day] as
existing [Fiscal Period].[Fiscal Period Hierarchy].[Day]
member [Measures].[LY Quantity] as
Aggregate
(
Generate
(
existing [Day],
{parallelperiod([Fiscal Period].[Fiscal Period Hierarchy].[Year],1,[Fiscal Period].[Fiscal Period Hierarchy].currentmember)}
), [Measures].[Quantity]),
FORMAT_STRING = "#,#",
VISIBLE = 1 ;
Regards,
Uma