![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a very simple cube consisting of two dimensions and one measure. The first dimensions is an ordinary Time-dimension (Year, Month, Quarter, Day) and the second Flow_type, is a flat dimension with just three members, 1= Opening Balance, 2 = In, 3 = Out. In the Calculated Members Builder I have created a Calculated Measure with the following syntax : Iif([Flow_Type] = 0, [Measures].[Quantity], Null) I don't get any syntax error when I click the Check-button, but something is wrong because the Calculated Measure just returns "Err". What's wrong? *** Sent via Developersdex http://www.developersdex.com *** |
#3
| |||
| |||
|
|
It's because of "[Flow_Type] = 0". Here, [Flow_Type] means ([Flow_Type].CurrentMember, Measures.CurrentMember), and Measures.CurrentMember means the Calculated Measure itself, which results in infinite recursive call. What do you want to mean by "[Flow_Type] = 0" exactly? Ohjoo Kwon "Gunnar Karlsson" <gunnar.karlsson (AT) intellibis (DOT) se> wrote in message news:%23$ZVs2mPFHA.576 (AT) TK2MSFTNGP15 (DOT) phx.gbl... I have a very simple cube consisting of two dimensions and one measure. The first dimensions is an ordinary Time-dimension (Year, Month, Quarter, Day) and the second Flow_type, is a flat dimension with just three members, 1= Opening Balance, 2 = In, 3 = Out. In the Calculated Members Builder I have created a Calculated Measure with the following syntax : Iif([Flow_Type] = 0, [Measures].[Quantity], Null) I don't get any syntax error when I click the Check-button, but something is wrong because the Calculated Measure just returns "Err". What's wrong? *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
|
Flow_Type is a dimension with three types of members, so what I mean by [Flow_Type] = 0 is that this calculated measure should only be given a value if the dimension member is of type = 0. "Ohjoo Kwon" wrote: It's because of "[Flow_Type] = 0". Here, [Flow_Type] means ([Flow_Type].CurrentMember, Measures.CurrentMember), and Measures.CurrentMember means the Calculated Measure itself, which results in infinite recursive call. What do you want to mean by "[Flow_Type] = 0" exactly? Ohjoo Kwon "Gunnar Karlsson" <gunnar.karlsson (AT) intellibis (DOT) se> wrote in message news:%23$ZVs2mPFHA.576 (AT) TK2MSFTNGP15 (DOT) phx.gbl... I have a very simple cube consisting of two dimensions and one measure. The first dimensions is an ordinary Time-dimension (Year, Month, Quarter, Day) and the second Flow_type, is a flat dimension with just three members, 1= Opening Balance, 2 = In, 3 = Out. In the Calculated Members Builder I have created a Calculated Measure with the following syntax : Iif([Flow_Type] = 0, [Measures].[Quantity], Null) I don't get any syntax error when I click the Check-button, but something is wrong because the Calculated Measure just returns "Err". What's wrong? *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |