![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| iif([Measures].[Count] > 0, |
#3
| ||||
| ||||
|
| iif([Time].CurrentMember.Children.Count > 0, |
| iif([Time].CurrentMember.Level Is [Time].[Month], |
| Assuming that there is a measure like Count (which isn't clear from the limited info provided), then maybe: iif([Measures].[Count] > 0, [%ACCOUNT%]-([%ACCOUNT%],[TimeDim].PrevMember), [%ACCOUNT%]-([%ACCOUNT%],[TimeDim].Parent.PrevMember) ) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
|
As Deepak says it is not entirely clear what you are trying to do, if you are trying to detect if the current time member has children then the following might work. iif([Time].CurrentMember.Children.Count > 0, [%ACCOUNT%]-([%ACCOUNT%],[TimeDim].PrevMember), [%ACCOUNT%]-([%ACCOUNT%],[TimeDim].Parent.PrevMember) ) Although if that were the case I would suspect you are trying to check whether you are at a specific level in which case the following is probably a better way to go. iif([Time].CurrentMember.Level Is [Time].[Month], [%ACCOUNT%]-([%ACCOUNT%],[TimeDim].PrevMember), [%ACCOUNT%]-([%ACCOUNT%],Ancestor([TimeDim].CurrentMember, Month)) ) Assuming that there is a measure like Count (which isn't clear from the limited info provided), then maybe: iif([Measures].[Count] > 0, [%ACCOUNT%]-([%ACCOUNT%],[TimeDim].PrevMember), [%ACCOUNT%]-([%ACCOUNT%],[TimeDim].Parent.PrevMember) ) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** -- Regards Darren Gosbell [MCSD] dgosbell_at_yahoo_dot_com Blog: http://www.geekswithblogs.net/darrengosbell |
![]() |
| Thread Tools | |
| Display Modes | |
| |