If you are unable to create a new account, please email support@bspsoftware.com

 

IF-Then-Else returning string instead of member (Dimensional) Easy one :)

Started by Tim Palmer, 16 Apr 2015 08:59:19 AM

Previous topic - Next topic

Tim Palmer

I am building a dimensional crosstab.  One edge is a tuple based on 2 prompt macros and an if statement.  week and pmeasure are from value prompts, year is from an IF statement based upon a sting match from the week prompt:

Tuple name:  Year Total

tuple(#prompt('P_Week')#, [Current Year] , #prompt('P_Measure')#)

The if statement passes through a a choice of data items that are dynamic year options:

lastChild([All Enrolment Years1])
lag( lastChild([All Enrolment Years1]), 1)
lag(lastChild([All Enrolment Years1]), 2)

The IF statement returns the member outputted from lastChild([All Enrolment Years1]) as a string!  As I am building a Tuple, I get an error message as below.  And my tuple is moribund.. 

I have built a simple tuple based on the data item that contains lastChild([All Enrolment Years1]) and it works perfectly..

Please help!  How do I stop this happening?


OP-ERR-0182

      Invalid parameter ''[Current Year]'' provided for 'tuple' at position '1' for 'dataItem="Year Total"'. This parameter is 'string' type but is expected to be one of the following: 'member'.





navissar

Hey Tim,
It could really help us help you if you posted the actual expression. You might have a typo somewhere that's messing everything up.