![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| MEMBER [Measures].[RunningSumLastYear] AS |
#3
| |||
| |||
|
|
Hi Max, The query is accessing [Time] at the [Year] level, so PeriodsToDate([Time].[Year]) is returning just that year. Assuming that data is loaded at the [Month] level, you could use NonEmptyCrossJoin() or Filter() to identify the last month with data and sum over months, like: MEMBER [Measures].[RunningSumLastYear] AS 'Sum(PeriodsToDate([Time].[Year], Tail(NonEmptyCrossJoin(Descendants([Time].CurrentMember, [Time].[Month]), {[Measures].[Sales]}, 1)).Item(0).Item(0)), [Measures].[SalesLastYear])' - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
| MEMBER [Measures].[RunningSumLastYear] AS |
![]() |
| Thread Tools | |
| Display Modes | |
| |