English (Español a continuación)
It is a function of the «string» type that detects if a character string begins with a specific prefix.
Its structure consists of 2 parts:
@CalcMgrStartsWith (text, prefix)
The first part is the text you are going to search, while the second part is the prefix you are going to search for.
If the text begins with that prefix it returns «True», otherwise it returns «False».
For example:
- @CalcMgrStartsWith (“CD_MAD”, “CD”) = True
- @CalcMgrEndsWith (“SP_LIS”, “CD”) = False
In the first case it locates the prefix «CD» at the beginning of the text «CD_MAD» and therefore returns «True», while in the second case it does not locate this prefix at the beginning of the text «SP_LIS» so it returns «False».
This function can be used within a conditional structure:
- IF …
- @CalcMgrStartsWith
- ENDIF
Let’s see an example: Let’s suppose we have a product portfolio in which the first two characters indicate the country of its commercialization:
- UK_AAC
- FR_BCCCB
- IT_CCCCD
- UK_ACX
We want to apply a certain margin to those products that are marketed in the UK.

This function selects those members of the «Products» dimension whose names begin with «UK» and applies a margin of 19% to them.
Español
Es una función del tipo “string” que detecta si una cadena de caracteres comienza por un prefijo determinado.
Su estructura consta de 2 partes: @CalcMgrStartsWith (Text, Prefix)
La primera parte es el texto en el que va a realizar la búsqueda, mientras que la segunda parte es el prefijo que va a buscar.
Si el texto comienza por ese prefijo devuelve “Verdadero”, en caso contrario devuelve “Falso”.
Si el texto comienza por ese prefijo devuelve “Verdadero”, en caso contrario devuelve “Falso”.
- @CalcMgrStartsWith (“CD_MAD”, “CD”) = Verdadero
- @CalcMgrEndsWith(“SP_LIS”, “CD”) = Falso
En el primer caso localiza el prefijo “CD” al inicio del texto “CD_MAD” y por tanto devuelve “Verdadero”, mientras que en el segundo caso no localiza este prefijo al inicio del texto “SP_LIS” por lo que devuelve “Falso”.
Esta función se puede utilizar dentro de una estructura condicional:
- IF…
- @CalcMgrStartsWith
- ENDIF
Veamos un ejemplo: Supongamos que tenemos una cartera de productos en la que los dos primeros caracteres indican el país de su comercialización:
- UK_AAC
- FR_BCCCB
- IT_CCCCD
- UK_ACX
Queremos aplicar un margen determinado a aquellos productos que se comercializan en UK.

Esta función selecciona aquellos miembros de la dimensión “Cuentas” cuyos nombres comiencen por “UK” y les aplica un margen del 19%.