on 05-01-2011 5:58 PM
Hi All,
I am trying to filter data at BW OLAP universe level for previous 12 months .The time period object in BW OLAP Universe is L01 Cal.Year/Month(0calmonth in BW).
Existing MDX expressions in the BW OLAP universe
Rolling 12 Months Avg:
<EXPRESSION>
( SUM({[0CALMONTH].currentmember.lag(11):[0CALMONTH].currentmember},@Select(Key Figures\Rejected Qty))
/
SUM({[0CALMONTH].currentmember.lag(11):[0CALMONTH].currentmember},@Select(Key Figures\Total Quantity))
) * 1000000
</EXPRESSION>
Rolling Month Avg:
<EXPRESSION>
( SUM({[0CALMONTH].currentmember},@Select(Key Figures\Rejected Qty))
/
SUM({[0CALMONTH].currentmember},@Select(Key Figures\Total Quantity))
) * 1000000
</EXPRESSION>
In relation to the 2 MDX statements above I am trying to place a filter on 0CALMONTH to get previous 12 months data only.
If I run the report on the universe today(April/2011) the universe should return data from Apr 2010 to March 2011 only.
Inputs greatly appreciated .
Thanks
Use Aggregate() function in place of sum for the Rolling Calculation. Eg:
<EXPRESSION>Aggregate( {[0CALMONTH].CurrentMember:[0CALMONTH].CurrentMember.lead(@Prompt('Numb
er of Months','N',,mono,free))},@Select(Measures\Amount))</EXPRESSION>
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.