@SUBSTRING

English (Español a continuación)

This function extracts part of a text / name of a member.

  • For example, from the member “January” we can extract “Jan”.

The structure of this function consists of 3 parts:

  • @SUBSTRING (A, B, C)

Part “A”: It is a text (in quotation marks) or a function that obtains the name of a member.

  • «January»
  • @NAME (@CURRMBR («Year»)) (= «January»)
  • @NAME (@CHILDREN («Year»)) (= «January»)

Part “B”: It is a number greater than or equal to 0 that indicates the initial position of the text string from which a section will be extracted.

  • 0: Start extracting from the first character of the text string
  • 1: Start extracting from the second character of the text string
  • 2: Start extracting from the third character of the text string

Part «C»: It is a number greater than or equal to 1 that indicates up to which position of the text string it is going to be extracted.

  • 1: Extract up to the first character of the text string
  • 2: Extract up to the second character from the text string
  • 3: Extract up to the third character from the text string

This parameter is optional; if left blank it is extracted to the end of the text string.

Let’s look at some examples:

  • @SUBSTRING («January», 0.3) = «Jan»
  • @SUBSTRING (@NAME (@CURRMBR («Year»)), 0,3) = «Jan» (We assume that the current member of the dimension «Year» being calculated is «January»)
  • @SUBSTRING («2017», 2,2) = «17»
  • @SUBSTRING («2017», 2) = «17»

Any question, please send an email to: essbaseeasy@gmail.com

Español

Esta función permite extraer parte de un texto  o del nombre de un miembro.

Por ejemplo del miembro “Enero” podemos extraer “Ene”.

La estructura de esta función consta de 3 partes:

@SUBSTRING(A,B,C)

Parte “A”: Es un texto (se pone entre comillas) o una función que permite obtener el nombre de un miembro.

“Enero”

@NAME(@CURRMBR(“Año”)) (=“Enero”)

@NAME(@CHILDREN(“Año”)) (=“Enero”)

Parte “B”: Es un número mayor o igual que 0 que indica la posición inicial de la cadena de texto a partir de la cual se va a extraer una sección.

0: Comienza a extraer desde el primer carácter de la cadena de texto

1: Comienza a extraer desde el segundo carácter de la cadena de texto

2: Comienza a extraer desde el tercer carácter de la cadena de texto

Parte “C”: Es un número mayor o igual que 1 que indica hasta que posición de la cadena de texto se va a extraer.

1: Extrae hasta el primer carácter de la cadena de texto

2: Extrae hasta el segundo carácter de la cadena de texto

3: Extrae hasta el tercer carácter de la cadena de texto

Este parámetro es opcional; si se deja en blanco se extrae hasta el final de la cadena de texto.

Veamos algunos ejemplos:

@SUBSTRING(“Enero”,0,3) = “Ene”

@SUBSTRING(@NAME(@CURRMBR(“Año”)),0,3) = “Ene” (Suponemos que el miembro actual de la dimensión “Año” que se está calculando es “Enero”)

@SUBSTRING(“2017”,2,2) = “17”

@SUBSTRING(“2017”,2) = “17”

Cualquier consulta envía, por favor, un correo a: essbaseeasy@gmail.com

Anuncio publicitario