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

 

FM 10.2.1 and BMT-MD-2047 Cannot assign the "_memberCaption" role to this query

Started by gosoccer, 08 Jul 2016 09:43:10 AM

Previous topic - Next topic

gosoccer

Hi folks, :) :)
Does anyone know how to deal with this issue. When I publish a package in DMR, because I have a numeric dollar value, I get the following error message.

BMT-MD-2047 Cannot assign the "_memberCaption" role to this query item because its data type is not "string". Either change the query item expression to be of type "string" or create a new string calculated item and assign the role to it.

Instead of using a cast (xxx,varchar), is there anyway to add to the Dimension that is created as a Rule so we don't have to convert everyting
to varchar?

I guess, I'm not sure how to do what's recommeded:
OR create a new string calculated item and assign the role to it.

Thanks so much... This problem is really bugging me.. :'( :'(


bus_pass_man

The message is saying that you are trying to use as the member caption an object whose data type is not a string.  It then complicates things by telling you about two possible ways to deal with the problem.   I suppose your confusion is generated by the unexpected attempt by the error message to be clear and helpful. 

You have a choice of actions.   One thing which would determine your actions is what you are using as your key for this level.  If you are using another object as the key then your choices are simpler.

If you are using another object as the key, then the simplest approach would be to edit the expression of the member caption attribute to cast the object reference to be a string.

If you are using the same attribute as both the key and the member caption you will need to create a new attribute which will have the member caption role.   There are two possible choices of actions to do that, which I will outline in the next two paragraphs.   In general keys ought to be numeric data types to perform best.

One choice would be to create a new query item in the source query subject and create an expression in it which casts to string whatever you want to use as the member caption.  You would then add an attribute to the level which you are modeling.  The attribute would have as its expression a reference to the query item that you created.  You would make that attribute your member caption.

Another choice would be to handle the casting in the level.  You would create an attribute in your level.  It would have an expression similar to that of the query item.  You would make that attribute your member caption.

I think it is good practice to use separate objects as your keys and member captions.  This allows you to change the value of the member caption over time without as much fuss as with keys.

I think this message will be also be generated if you validate the model.  You ought to make it a practice to validate the model so that you don't get surprised by errors popping up during publishing. 

From what you've written you are trying to create members based on specific dollar values.  Knowing the purpose of the dimension might be helpful.  It might enable me to identify other things to suggest.

gosoccer

Thank you so much. I'm reviewing your note and see which approach make sense.