Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


YTD Calculation in a Cube?


YTD Calculation in a Cube?

Author
Message
NewSSAS
NewSSAS
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 101
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search