SELECTION OF MEMBERS / SELECCIÓN DE MIEMBROS

English (Español a continuación)

The selection of members in the Report Script can be done individually (member by member) or by selection commands.

  • These procedures can be used to select Page / Column / Row members.

I.- Individual selection

Members are selected individually.

For example:

  • <ROW(Markets,Products,Indicators)
  • Barcelona
  • Tarragona
  • Lerida
  • Girona

II.- Selection commands

II.a.- Through references to levels or generations

  • Lev”n”,Dimension
  • Gen”n”,Dimension

Their components:

  • “n”: the level or generation number.
  • Dimension: name of the dimension from which members are to be selected.

For example:

  • Lev0,Markets
  • Gen3,Markets

Some considerations:

  • A space is not included between the comma and the dimension name.

Let’s look at these two commands:

LEV

This command selects all members from a specific level of a given dimension.

Its syntax is:

  • LEV “Level number or Level name”,Dimension

For example:

  • LEV4,“Markets” (selects all the members of the 4th level of the “Markets” dimension).

Or suppose that this level 4 is called “Intermediate Markets”; the command would be:

  • “Intermediate markets”,“Markets”

GEN

This command selects all members of a specific generation of a given dimension.

Its syntax is:

  • GEN “Generation number or Generation name”,Dimension

An example:

  • GEN2,“Markets” (selects all members of the 2nd generation of the “Markets” dimension).

Or suppose generation 2 is called “Major Markets”; the command would be:

  • “Main markets”,“Markets”

II.b.- Other selection commands

Selection commands begin with a “ < “ sign.

Below we list some of them:

<ALLINSAMEDIM: Select members of the same dimension as the member being displayed.

Its structure:

  • <ALLINSAMEDIM “member”
  • The specified “member” causes this command to select all members of that dimension.

<ALLSIBLINGS: Selects all siblings of the indicated member (including the member itself).

Its structure:

  • <ALLSIBLINGS “member”

<ANCESTORS: Select all the ancestors of the indicated member.

Its structure:

  • <ANCESTORS “member”

If we want the selection to include the indicated member, we use the command:

  • <IANCESTORS “member”

<CHILDREN: Select the child members of the specified member.

  • <CHILDREN “member”

If we want the selection to include the indicated member, we use the command:

  • <ICHILDREN “member”

<DESCENDANTS: Select the descendant members of the specified member.

  • <DESCENDANTS “member”

If we want the selection to include the indicated member, we use the command:

  • <IDESCENDANTS “member”

<DIMBOTTOM: Selects all level 0 members of the dimension to which the indicated member belongs.

  • <DIMBOTTOM “member”

<DIMTOP: Selects the header of the dimension to which the indicated member belongs.

  • <DIMTOP “member”

<PARENT: Select the parent of the indicated member.

  • <PARENT “member”

If we want the selection to include the indicated member, we use the command:

  • <IPARENT “member”

<OFSAMEGEN: Includes members of the same generation and dimension as the indicated member.

  • <OFSAMEGEN “member”

<ONSAMELEVELAS: Includes members of the same level and dimension as the indicated member.

  • <ONSAMELEVELAS “member”

<TODATE: This command allows to select data from a given date, from a given period, or from a period before or after a given date.

Its structure is:

  • <TODATE(Date Format, Date)

Date format: selects the format of the date to be used; It can be of two types: “mm-dd-yyyy” or “dd-mm-yyyy”.

Date: date that is used as a reference to extract the information.

Examples:

  • <TODATE(“mm-dd-yyyy”,”04-15-2020”)
  • <TODATE(“dd-mm-yyyy”,”15-04-2020”)

This command must be used within the <WITHATTR command.

Let’s see some examples: suppose an outline with the dimension “Date_sales”; We want to extract the sales made based on the date:

  • <WITHATTR(“Sales_date”, “>”, <TODATE(“dd-mm-yyyy”,”06-01-2020”)): selects all sales made after 06-01-2020.
  • <WITHATTR(“Date_sales”, “=”, <TODATE(“dd-mm-yyyy”,”06-01-2020”)): selects all sales made on 06-01-2020.
  • <LINK(<WITHATTR(“Sales_Date”, “>=”, <TODATE(“dd-mm-yyyy”,”06-01-2020”)) AND <WITHATTR(“Sales_Date”, “<=”, <TODATE (“dd-mm-yyyy”,”08-31-2020”))): selects all sales made between 06-01-2020 and 08-31-2020.

Some considerations:

  • The dates to be used must be between “01-01-1970” and “31-12-2037”.

III.- Individual selection mix and selection commands

For example:

  • “Lev0,Markets”, Spain, Catalonia

IV.- Concatenate filters

We use the <LINK command together with Boolean operators (AND / OR / NOT) and extraction commands (<ANCESTORS, <CHILDREN…).

  • This operator allows concatenating conditions.

Its structure is:

  • <LINK(“Extraction command” operator “Extraction command” operator…)

Boolean operators:

  • AND: all conditions must be met.
  • OR: it is enough that a condition is met.
  • NOT: this condition must not be fulfilled.

Examples:

  • <LINK(<DESCENDANTS(Catalonia) AND <DESCENDANTS(Levante))
  • <LINK(<DESCENDANTS(Catalonia) AND NOT <DESCENDANTS(Levante))
  • <LINK(<DESCENDANTS(Catalonia) OR <UDA(Markets, Large))

Some considerations:

  • All extract commands within the <LINK must reference the same dimension.
  • Conditions are read from left to right.
  • Conditions can be grouped within parentheses: inner parentheses are evaluated before outer ones.

Let’s look at some examples:

  • (A AND B OR C): it is valid if conditions A and B or C are met. It is equivalent to the following expression.
  • (A AND (B OR C)): it is valid if conditions A and B or C are met.
  • ((A AND B) OR C): it is valid if conditions A and B are met, or if condition C is met.

V.- Deletion of shared members

If you want to prevent shared members from appearing in the selection of members, use the command:

  • <SUPSHARE

This command is placed at the top of the Report Script before entering the Page / Column / Row definition and affects the entire Report Script, which can contain more than one Report (each one ending with its corresponding sign !).

This command works when the following instructions are used in the selection of members:

  • Generation name / level
  • DIMBOTTON
  • OFSAMEGEN
  • ONSAMELEVELAS

If in a later Report (within the Report Script) you want to cancel the effect of this command and also select shared members, use the command.

  • <SUPSHAREOFF

This is the default option.

Español

La selección de miembros en el Report Script se puede realizar individualmente (miembro a miembro) o utilizando comandos de selección.

  • Estos procedimientos se pueden utilizar para seleccionar los miembros de Página / Columna / Fila.

I.- Selección individual

Se seleccionan los miembros individuamente.

Por ejemplo:

  • <ROW(Mercados,Productos,Indicadores)
  • Barcelona
  • Tarragona
  • Lérida
  • Gerona

II.- Comandos de selección

II.a.- Mediante referencias a niveles o generaciones

  • Lev”n”,Dimensión
  • Gen”n”,Dimensión

Siendo:

  • “n”: el número del nivel o de la generación.
  • Dimensión: nombre de la dimensión de la que se van a extraer miembros.

Por ejemplo:

  • Lev0,Mercados
  • Gen3,Mercados

Algunas consideraciones:

  • Entre la coma y el nombre de la dimensión no se incluye un espacio.

Veamos estos dos comandos:

LEV

Este comando selecciona todos los miembros de un nivel determinado de una dimensión concreta.

Su sintaxis es:

  • LEV “Número nivel o Nombre nivel”,Dimensión

Por ejemplo:

  • LEV4,“Mercados” (selecciona todos los miembros del nivel 4º de la dimensión “Mercados”).

O supongamos que este nivel 4 se denomina “Mercados intermedios”; el comando sería:

  • “Mercados intermedios”,“Mercados”

GEN

Este comando selecciona todos los miembros de una generación determinada de una dimensión concreta.

Su sintaxis es:

  • GEN “Número generación o Nombre generación”, Dimensión

Un ejemplo:

  • GEN2,“Mercados” (selecciona todos los miembros de la generación 2º de la dimensión “Mercados”).

O supongamos que la generación 2 se denomina “Mercados principales”; el comando sería:

  • “Mercados principales”,“Mercados”

II.b.- Otros comandos de selección

Los comandos se selección comienzan con el signo “ < “.

A continuación relacionamos algunos de ellos:

<ALLINSAMEDIM: Selecciona los miembros de la misma dimensión que el miembro que se muestra.

Su estructura:

  • <ALLINSAMEDIM “miembro”
  • El “miembro” especificado hace que este comando seleccione todos los miembros de esa dimensión.

<ALLSIBLINGS: Selecciona todos los hermanos del miembro indicado (incluido el propio miembro).

Su estructura:

  • <ALLSIBLINGS “miembro”

<ANCESTORS: Selecciona todos los ascendientes del miembro indicado.

Su estructura:

  • <ANCESTORS “miembro”

Si queremos que la selección incluya el miembro indicado utilizamos el comando:

  • <IANCESTORS “miembro”

<CHILDREN: Selecciona los miembros hijos del miembro especificado.

  • <CHILDREN “miembro”

Si queremos que la selección incluya el miembro indicado utilizamos el comando:

  • <ICHILDREN “miembro”

<DESCENDANTS: Selecciona los miembros descendientes de miembro especificado.

  • <DESCENDANTS “miembro”

Si queremos que la selección incluya el miembro indicado utilizamos el comando:

  • <IDESCENDANTS “miembro”

<DIMBOTTOM: Selecciona todos los miembros nivel 0 de la dimensión a la que pertenece el miembro indicado.

  • <DIMBOTTOM “miembro”

<DIMTOP: Selecciona la cabecera de la dimensión a la que pertenece el miembro indicado.

  • <DIMTOP “miembro”

<PARENT: Selecciona el padre del miembro indicado.

  • <PARENT “miembro”

Si queremos que la selección incluya el miembro indicado utilizamos el comando:

  • <IPARENT “miembro”

<OFSAMEGEN: Incluye los miembros de la misma generación y dimensión que el miembro indicado.

  • <OFSAMEGEN “miembro”

<ONSAMELEVELAS: Incluye los miembros del mismo nivel y dimensión que el miembro indicado.

  • <ONSAMELEVELAS “miembro”

<TODATE: Este comando permite seleccionar datos de una fecha determinada, de un periodo determinado, o de un periodo antes o después de una fecha determinada.

Su estructura es:

  • <TODATE(Formato fecha, Fecha)

Formato fecha: recoge el formato de la fecha que se va a utilizar; puede ser de dos tipos: “mm-dd-yyyy” o “dd-mm-yyyy”.

Fecha: fecha que se utiliza de referencia para extraer la información.

Ejemplos:

  • <TODATE(“mm-dd-yyyy”,”04-15-2020”)
  • <TODATE(“dd-mm-yyyy”,”15-04-2020”)

Este comando hay que utilizarlo dentro del comando <WITHATTR.

Veamos algunos ejemplos: supongamos un outline con la dimensión “Fecha_ventas”; vamos a extraer las ventas realizadas en función de la fecha:

  • <WITHATTR(“Fecha_ventas”, “>”, <TODATE(“dd-mm-yyyy”,”01-06-2020”)): selecciona todas las ventas realizadas después del 01-06-2020.
  • <WITHATTR(“Fecha_ventas”, “=”, <TODATE(“dd-mm-yyyy”,”01-06-2020”)): selecciona todas las ventas realizadas el día 01-06-2020.
  • <LINK(<WITHATTR(“Fecha_ventas”, “>=”, <TODATE(“dd-mm-yyyy”,”01-06-2020”)) AND <WITHATTR(“Fecha_ventas”, “<=”, <TODATE(“dd-mm-yyyy”,”31-08-2020”))): selecciona todas las ventas realizadas entre el día 01-06-2020 y el día 31-08-2020.

Algunas consideraciones:

  • Las fechas a utilizar deben estar comprendidas entre el “01-01-1970” y el “31-12-2037”.

III.- Mix de selección individual y comandos de selección

Por ejemplo:

  • “Lev0,Mercados”, España, Cataluña

IV.- Concatenar filtros

Utilizamos el comando <LINK junto a operadores booleanos (AND / OR / NOT) y comandos de extracción (<ANCESTORS, <CHILDREN…).

  • Este operador permite concatenar condiciones.

Su estructura es:

  • <LINK(“Comando extracción” operador “Comando extracción” operador…)

Operadores booleanos:

  • AND: todas las condiciones se deben cumplir.
  • OR: es suficiente con que se cumpla una condición.
  • NOT: no debe cumplir esa condición.

Ejemplos:

  • <LINK(<DESCENDANTS(Cataluña) AND <DESCENDANTS(Levante))
  • <LINK(<DESCENDANTS(Cataluña) AND NOT <DESCENDANTS(Levante))
  • <LINK(<DESCENDANTS(Cataluña) OR <UDA(Mercados, Grandes))

Algunas consideraciones:

  • Todos los comandos de extracción dentro del <LINK deben hacer referencia a la misma dimensión.
  • Las condiciones se leen de izquierda a derecha.
  • Las condiciones se pueden agrupar entre paréntesis: los paréntesis interiores se evalúan antes que los exteriores.

Veamos algunos ejemplos:

  • (A AND B OR C): es válida si se cumple las condiciones A y la B o la C. Es equivalente a la siguiente expresión.
  • (A AND (B OR C)): es válida si se cumple las condiciones A y la B o la C.
  • ((A AND B) OR C): es válida si se cumplen las condiciones A y B, o si se cumple la condición C.

V.- Supresión de miembros compartidos

Si en la selección de miembros se quiere evitar que figuren los miembros compartidos se utiliza el comando:

  • <SUPSHARE

Este comando se sitúa en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila y afecta a todo el Report Script, que puede contener más de un Report (cada uno finalizado con su correspondiente signo !).

Este comando actúa cuando en la selección de miembros se utilizan las siguientes instrucciones:

  • Nombre generación / nivel
  • Comando DIMBOTTON
  • Comando OFSAMEGEN
  • Comando ONSAMELEVELAS

Si en un Report posterior (dentro del Report Script) se quiere anular el efecto de este comando y seleccionar también miembros compartidos se utiliza el comando.

  • <SUPSHAREOFF

Esta es la opción por defecto.

Anuncio publicitario