![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| IIF([Time].[Financial].CurrentMember is |
#3
| |||
| |||
|
|
What if you use the "is" comparison, like: IIF([Time].[Financial].CurrentMember is [Time].[Financial].[All Time].FirstChild.FirstChild.FirstChild.FirstChild.First Child, CoalesceEmpty([Measures].[Selling Price Major]), 0), IIF(NOT ISEMPTY([Measures].[Selling Price Major]), [Measures].[Selling Price Major], [Time].[Financial].PrevMember)) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
|
I think the issue might be that in your "previous period" logic you are not specifying which measure to use. It therefore uses the current member in the measures dimension, which is the calculated measure itself and results in "infinite" recursion. What I think you need to do is to replace: [Time].[Financial].PrevMember with: ([Time].[Financial].PrevMember,[Measures].[Selling Price Major]) which will tell the formula to return the [Selling Price Major] measure from the previous period, instead of trying to return the value of the current calculation from the previous period. eg IIF([Time].[Financial].CurrentMember.("Business Date Id") = [Time].[Financial].[All Time].FirstChild.FirstChild.FirstChild.FirstChild.First Child.Properties ("Business Date Id"), IIF(NOT ISEMPTY([Measures].[Selling Price Major]), [Measures].[Selling Price Major], 0), IIF(NOT ISEMPTY([Measures].[Selling Price Major]), [Measures].[Selling Price Major], ([Time].[Financial].PrevMember,[Measures].[Selling Price Major])) ) Let me know if this works for you. |
![]() |
| Thread Tools | |
| Display Modes | |
| |