Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

YTD Calculation in a Cube?

$
0
0
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) CALCULATE2) There is a [Year To Date] - New Calculated Member is visible3) 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 ScopeA) 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.

Viewing all articles
Browse latest Browse all 1341

Trending Articles