Hi,

I'd like to add a calculated measure to the solution based on the statement below. I don't succeed.

How can I add this to the cube?

Thanks..

SUM(
{[Posting Date].[Day].CURRENTMEMBER.LAG(30):[Posting Date].[Day].CURRENTMEMBER}
,[Measures].[QTY Invoiced]
),
FORMAT_STRING = "#,0",
VISIBLE = 1;

([Measures].[QTY Invoiced last 30 days], [Posting Date].[Date YQMD].[Year].Members) =
SUM(
{ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(30) :
ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(1)
,[QTY Invoiced last 30 days]);

([Measures].[QTY Invoiced last 30 days], [Posting Date].[Date YQMD].[Quarter].Members) =
SUM(
{ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(30) :
ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(1)
,[QTY Invoiced last 30 days]);

([Measures].[QTY Invoiced last 30 days], [Posting Date].[Date YQMD].[Month].Members) =
SUM(
{ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(30) :
ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(1)
,[QTY Invoiced last 30 days]);

([Measures].[QTY Invoiced last 30 days], [Posting Date].[Date YQMD].[Day].Members) =
SUM(
{ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(30) :
ClosingPeriod([Posting Date].[Date YQMD].[Day],[Posting Date].[Date YQMD].[Day].CURRENTMEMBER).LAG(1)
,[QTY Invoiced last 30 days]);