![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
| ([Measures].[Revenue],ClosingPeriod( [Time].[Year], Ancestor |
| SUM(TAIL(FILTER(DESCENDANTS |
|
I try the following to retrieve previous year ClosePeriod, but I can not get it to work properly. ([Measures].[Revenue],OpeningPeriod ( [Time].[Year], [Time].CurrentMember)) Please help Tomas |
#3
| |||
| |||
|
|
I think you might be looking for something like the following, getting the closingPeriod of the previous year. ([Measures].[Revenue],ClosingPeriod( [Time].[Year], Ancestor ([Time].CurrentMember,Year).PrevMember)) Probably a more robust (& complicated) solution would be the one below. * I start by getting the current time member * then getting its year * going back to the previous year * getting all the leaf member under the previous year * filtering out empty cells * getting the last (non empty) cell SUM(TAIL(FILTER(DESCENDANTS (Ancestor([Time].CurrentMember,Year).PrevMember,,LEAVES),NOT IsEmpty ([Measures].[Revenue])),1),[Measures].[Revenue]) -- Regards Darren Gosbell [MCSD] dgosbell_at_yahoo_dot_com Blog: http://www.geekswithblogs.net/darrengosbell In article <26DC4CBF-93B0-4E71-88D4-D47DA223B757 (AT) microsoft (DOT) com>, Tomas (AT) discussions (DOT) microsoft.com says... I try the following to retrieve previous year ClosePeriod, but I can not get it to work properly. ([Measures].[Revenue],OpeningPeriod ( [Time].[Year], [Time].CurrentMember)) Please help Tomas |
#4
| |||
| |||
|
|
Sorry but you answer is incorrect. It will not work when you select a month, or a quarter which is the problem that I am having with the following ( [Measures].[Actual Revenue],ParallelPeriod([Time].[Year] , 1 , [Time].Currentmember)) That will display each Month, quarter, but not sum in other words if I select Feb 2005, it will not contain Jan and Feb 2005. Please help |
#5
| |||
| |||
|
|
Sorry, but your question is not very clear, your subject line mentions YTD and then you asked about getting the closing period for the previous year. If you want to do a YTD, you can do something like the following. SUM(YTD(Time.CurrentMember), [Measures].[Actual Revenue]) This relies on your time dimension being configured properly, otherwise you can do it manually with the following SUM(PeriodToDate(Time.Year, Time.CurrentMember), [Measures].[Actual Revenue]) -- Regards Darren Gosbell [MCSD] dgosbell_at_yahoo_dot_com Blog: http://www.geekswithblogs.net/darrengosbell In article <594808E5-5109-4DFF-BEC3-3C61007ECB56 (AT) microsoft (DOT) com>, Tomas (AT) discussions (DOT) microsoft.com says... Sorry but you answer is incorrect. It will not work when you select a month, or a quarter which is the problem that I am having with the following ( [Measures].[Actual Revenue],ParallelPeriod([Time].[Year] , 1 , [Time].Currentmember)) That will display each Month, quarter, but not sum in other words if I select Feb 2005, it will not contain Jan and Feb 2005. Please help |
#6
| |||
| |||
|
|
1) if I select Feb 2005, it will include January and Feb 2005. |
|
2) Another measure is to Retrieve the Previous Year YTD for the time select above. |
![]() |
| Thread Tools | |
| Display Modes | |
| |