One possible way is to use the Lag function,
Total Sales 0-30 Days Ago: SUM({ [Time].[Day].CurrentMember.Lag(30) :
[Time].[Day].CurrentMember }, [Measures].[Sale Amount] )
Total Sales 31-60 Days Ago: SUM( { [Time].[Day].CurrentMember.Lag(60) :
[Time].[Day].CurrentMember.Lag(31) }, [Measures].[Sale Amount])
Might be a better way but I can't think of it.
<nc (AT) nospam (DOT) com> wrote
Quote:
I have a SQL server table with three fields, Customer, Sale_Date and
Sale_Amount.
From this, I need to create a cube with measures or calculated members
that contain sales totals from certain date ranges, for example:
Total Sales 0-30 Days Ago Total Sales 31-60 Days
Ago....
Customer 1
Customer 2
...
Should I create these ranges in a summary table in SQL Server before
bringing the data into Analysis Services, or is there a way to group the
|
data into ranges within a cube?