Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

YTD

Status
Not open for further replies.

NotSQL

Technical User
Joined
May 17, 2005
Messages
205
Location
GB
Hi Guys,

Im pretty new to Analysis Service and would like to create a YTD measure with in my cube. How would i go about doing something like this?

Regards
Dave
 
The simple answer is

Sum(YTD(),[Measures].[YourMeasure])

This assumes you have a correctly defined time dimension/hierarchy with a Year defined as type 'years'

A
 
And do you do this within the caluclations tab? My Time dimension is fine...
 
How would i do previous YTD?
 
Prior YTD you would implement using the ParallelPeriod() Function.
 
YTD:
Sum(PeriodsToDate([Dim Time].[Time Hierarchy].[Year], [Dim Time].[Time Hierarchy].CurrentMember), [Measures].[MeasureName])

Prev YTD:
(ParallelPeriod([Dim Time].[Time Hierarchy].[Year], 1), [Measures].[YTD])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top