In the report, if you need to prorate your measure value based on the month or quarter you are showing, you can do something like the example explained below.
Example. You might get yearly target of say 400 million dollar and based on the quarter you are in, might want prorate the value as under –
Quarter Number | Prorated $ Value |
Quarter 1 | 100 |
Quarter 2 | 200 |
Quarter 3 | 300 |
Quarter 4 | 400 |
WITH
MEMBER MEASURES.MONTHNUMBE AS
Month(Cdate(Left(Right([TIME].[YQMD].CurrentMember.UniqueName,20),10)))
MEMBER MEASURES.PRORATED_TARGET AS
CASE
WHEN MEASURES.MONTHNUMBER = 1 THEN 1 * [MEASURES].[TARGET] / 4
WHEN MEASURES.MONTHNUMBER = 4 THEN 2 * [MEASURES].[TARGET] / 4
WHEN MEASURES.MONTHNUMBER = 7 THEN 3 * [MEASURES].[TARGET] / 4
ELSE 4 * [MEASURES].[TARGET] / 4
END
SELECT
{
MEASURES.PRORATED_TARGET
,MEASURES.MONTHNUMBER
} ON COLUMNS
,
NonEmpty
(
StrToMember(@ParamTime).Parent.Lag(3) : StrToMember(@ParamTime).Parent
,[Measures].[TARGET]
)
DIMENSION PROPERTIES
MEMBER_CAPTION
,MEMBER_UNIQUE_NAME
,PARENT_UNIQUE_NAME
,LEVEL_NUMBER
ON ROWS
FROM [YOUR_CUBE];
In case of you want your prorating to be done monthly, meaning like –
Month Number | Prorated $ Value |
January | 1*400/12 |
February | 2*400/12 |
……. | --- |
December | 12*400/12 |
Replace above calculated member as under -
YTD().Count*[Measures].[TPM FY TARGET]/12
No comments:
Post a Comment