LASTPERIODS FUNCTION
I responded to a news group post regarding calculating last 7 days total. This function could come in handy as follows against AS2005 samples cube.
with
member measures.x as
sum(
{
lastperiods(
7,
[Date].[Calendar].[Date].&[629]
)
}
,
[Measures].[Internet Sales Amount]
)
select
{
lastperiods(
7,
[Date].[Calendar].[Date].&[629]
)
} on 1
,
{
[Measures].[Internet Sales Amount]
,
measures.x
}
on 0
from
[Adventure Works]
HTH
Happy Cubing,
ZULFIQAR SYED
Thanks a lot man, this saved me a lot of time!
Posted by: Kenny | June 02, 2009 at 05:38 AM