English (Español a continuación)
This function is used with text attribute dimensions and extracts the attribute assigned to the members of the base dimension.
Its structure consists of a single parameter:
- @ATTRIBUTESVAL (A);
Part «A»: attribute dimension.
- If a member level 0 of the base dimension does not have an attribute associated with this attribute dimension, this function returns «#missing».
Let’s see an example: the following outline has two dimensions:
- «Destination»: base dimension associated with the attribute dimension «Discount».
- «Offer»: text attribute dimension.

Applying the following function:
- @ATTRIBUTESVAL (Offer);
We obtain:

We could use this function in a calculation: we can extract the final digit of the offer and based on this we apply a discount or another.
- «Final price»(
- IF (@CalcMgrDoublefromString (@SUBSTRING (@ATRIBUTESVAL (Offer), 5)) == 1)
- “Initial_Price” * 0.9;
- ELSEIF (@CalcMgrDoublefromString (@SUBSTRING (@ATRIBUTESVAL (Offer), 5)) == 2)
- “Initial_Price” * 0.85;
- ELSEIF (@CalcMgrDoublefromString (@SUBSTRING (@ATRIBUTESVAL (Offer), 5)) == 3)
- “Initial_Price” * 0.75;
- ELSE
- «Starting price»;
- ENDIF
- )
Español
Esta función se utiliza con dimensiones atributos de tipo texto y extrae el atributo asignado a los miembros de la dimensión base.
Su estructura consta de un único parámetro:
- @ATTRIBUTESVAL(A);
Parte “A”: dimensión atributo.
- Si un miembro de nivel 0 de la dimensión base no tiene asociado un atributo de esta dimensión atributo, esta función devuelve “#missing”.
Veamos un ejemplo: partimos del siguiente outline con dos dimensiones:
- “Destino”: dimensión base que tiene asociada la dimensión atributo “Descuento”.
- “Oferta”: dimensión atributo de tipo texto

Aplicando la siguiente función:
- @ATTRIBUTESVAL(Oferta);
Obtenemos:

Esta función la podríamos utilizar en un cálculo: podemos extraer el dígito final de la oferta y en función de ello aplicamos un descuento u otro.
- “Precio_Final”(
- IF(@CalcMgrDoublefromString(@SUBSTRING(@ATRIBUTESVAL(Oferta),5)) == 1)
- “Precio_Inicial” * 0.9;
- ELSEIF(@CalcMgrDoublefromString(@SUBSTRING(@ATRIBUTESVAL(Oferta),5)) == 2)
- “Precio_Inicial” * 0.85;
- ELSEIF(@CalcMgrDoublefromString(@SUBSTRING(@ATRIBUTESVAL(Oferta),5)) == 3)
- “Precio_Inicial” * 0.75;
- ELSE
- “Precio_Inicial”;
- ENDIF
- )