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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Boolean Variable with complex functions - ERROR

Started by qvixote, 30 Apr 2014 11:05:52 AM

Previous topic - Next topic

qvixote

Hello!

I have a calculated measure in a query on RS 10 that gives me the 0-based position of the current level of a hierarchy, its working perfectly and I use it in other calculation that use a different divisor depending of the hierarchy level. This is the expression:

ordinal (level (currentMember ([DBV_03].[País].[País])))

Where [DBV_03].[País].[País] is the hierarchy.

Now I need to display an element when the above expression value = 1 (the second level) and hide it to others levels. I tried to do it using the same expression in a boolean variable and didn't work:

Expression: ordinal (level (currentMember ([DBV_03].[País].[País]))) = 1
Error: RSV-VAL-0034 Error al validar la variable Booleano1. CRX-API-0011 No se ha encontrado el nombre de la función en o cerca de la posición ' 8' de la expresión: " ordinal (level (currentMember ([DBV_03].[País].[País]))) = 1 "..

It's in spanish, but it says something like "error when validating variable Booleano1, can't find the name of the function near position 8 of expression..."

Can you help me with that?

MFGF

You need to define the expression first in a query calculation, then reference that query calculation in your boolean expression. The variable expression editor is expecting the item to be resolved in the query already, and mdx functions such as ordinal() and level() are not permitted directly.

You may also have to make the query calc a property of your crosstab rows or columns to force it to get evaluated.

Cheers!

MF.
Meep!

qvixote

Thanks for your help!

I have defined a calculation with that expression already. I referenced that query in the boolean expression and I get this error:

RSV-VAL-0032 La siguiente expresión no es válida: [Query_DefMort].[NivelTerritorio_Region] = 1. Si el elemento existe en una solicitud, pero no se hace referencia a él en el diseño, agréguelo a una lista de propiedades. CRX-API-0005 Se ha producido un error en o cerca de la posición ' 0'. La variable denominada ' [Query_DefMort].[NivelTerritorio_Region]' no es válida.


It says something like "The following expression is not valid: [Query_DefMort].[NivelTerritorio_Region] = 1. If the element exists but its not referenced in the design, add it on a properties list ". Here comes your advise of having to make the query calc a property of the crosstab rows or columns. I've never did that, how can I do it?

MFGF

Quote from: qvixote on 30 Apr 2014 11:30:08 AM
Here comes your advise of having to make the query calc a property of the crosstab rows or columns. I've never did that, how can I do it?

Yes - exactly!

Select either the row or column headings in your crosstab, go to the Properties property, and put a check next to your new query calc to mark it as a property of the row or column edge. This forces it to get evaluated even though it isn't being displayed.

Cheers!

MF.
Meep!

qvixote

Yes, that did the trick!

Thank you very much!