Database Reference
In-Depth Information
Having calculated the previous member sales, it is now very easy to compute the
growth percentage, taking care to handle, as before, division by zero.
CREATE MEMBER CURRENTCUBE.Measures.PreviousPeriodGrowth AS
DIVIDE (,
Measures.[Sales Amount] - Measures.PreviousPeriodSales,
Measures.PreviousPeriodSales
),
FORMAT_STRING = "#,#.00%";
This produces the following output:
Same period previous year
In a similar way to the previous period calculation, we might want to check the
sales of the current month against the same month in the previous year. The function
to use here is ParallelPeriod , which takes three parameters: a level, the number
of periods to go back, and a member. It takes the ancestor of the member at the
specified level, goes back the number of periods specified at that level, and then finds
the child of the member at the same level as the original member, in the same relative
position as the original member was.
 
Search WWH ::




Custom Search