Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

YTD Calculation in a Cube? Expand / Collapse
Author
Message
Posted Sunday, September 8, 2013 7:27 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 4, 2013 10:34 AM
Points: 2, Visits: 28
Hi,
Can any one help with the YTD calculation?

Based on Define Time Intelligence I have created the Year to Date.

The below steps has come up automatically once I created YTD in Time Intelligence.

I will show the steps is there in Calculations Tab:

1) CALCULATE

2) There is a [Year To Date] - New Calculated Member is visible

3) New Script Command - (My script is)

Scope(
{
[Measures].[NEW RX],
[Measures].[TOTAL RX],
[Measures].[NEW QTY],
[Measures].[TOTAL QTY],
[Measures].[TEB]
}
)

4) New Script Command - Script for YTD

/*Year to Date*/
(
[DIM TIME].[Hierarchy DIM TIME Calculations].[Year to Date],
[DIM TIME].[CALENDARYEAR].[CALENDARYEAR].Members,
[DIM TIME].[DIM TIME ID].Members
)

=

Aggregate(
{ [DIM TIME].[Hierarchy DIM TIME Calculations].[Current DIM TIME] }
*
PeriodsToDate(
[DIM TIME].[Hierarchy].[CALENDARYEAR],
[DIM TIME].[Hierarchy].CurrentMember
)
)

5) End Scope

A) Do I have to change the code? Is there anything wrong in the code?

2) What is the next step should I follow to bring it up in my measures?

NOTE: I processed but it is not displaying my YTD in my measures.

This is very urgent requirement for me.
Post #1492638
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse