English (Español a continuación)
In this lesson we will analyze the following points:
- I.- COMMANDS
- CALCULATE ROW
- PRINTROW
- SETROWOP
- OFFROWCALCS
- ONROWCALCS
- CLEARROWCALC
- CLEARALLROWCALC
- II.- EXAMPLES
- III.- OTHER COMMANDS
- SAVEROW
- SAVEONDOUTPUT
I.- COMMANDS
1.- CALCULATE ROW
This command allows to include a new calculated row in the Report Script.
- It is useful to add rows and obtain subtotals or totals.
- This command is included before the rows to be used in the calculation.
- This command calculates the row but does not display it in the Report Script; for it to figure you have to use the {PRINTROW} command.
- For this command to work, the definition of the <COLUMN section must come before the definition of the <ROW section.
Syntax: there are 2 possibilities:
- {CALCULATE ROW “New Row” [“Operator”]}
- {CALCULATE ROW “New Row” [“Column number”] = “Expression”}
New Row: is the name of the new row to be included in the Report Script; must be between “ “.
- If there are several columns with row names, all these fields must be included in the name of the new row, separating each field with the «~» sign.
- For example: suppose there are two columns with row names corresponding to the dimensions «Markets» and «Indicators», in the new calculated row we have to select a name for each column:
- {CALCULATE ROW “Total~Sales”}
Operator: is optional and defines the mathematical operator to be applied:
- The mathematical operators that can be used: + , – , * , / , %x%y (calculates x as a % of y).
- OFF: stops the calculation.
- If not defined, the sum is applied by default.
Column number: it is optional, it indicates for which data column the new row is going to be calculated; if not specified, it is calculated for all columns.
Expression:
- They are calculated from left to right.
- Parentheses cannot be used.
- They cannot contain member names.
- Number of columns: they are defined with a number that refers to their original order in the Report Script.
- Numbers: they can be with decimals (for example: 0.07) or integers (to which you must put a “.” (for example: 7.) to differentiate them from a reference to a column.
Examples: the following example calculates a new row called “Total” as the sum (since no operator is defined, it is the one applied by default) of the members that follow.
- {CALCULATE ROW “Total”}
- …
- …
- …
Another example: Calculate a row «Europe» as the sum of the members that follow, another row «Asia» in the same way, and a row «Total» as the sum of the 2 previous rows.
- {CALCULATE ROW “Europe”}
- …
- …
- {CALCULATE ROW “Asia”}
- …
- …
- {CALCULATE ROW “Total” = “Europe” + “Asia”}
If in the previous example, we had defined {CALCULATE ROW “Total” 3 = “Europe” + “Asia”} the new calculated row would only be calculated for the 3rd column.
2.- PRINTROW
This command gives the instruction for the new calculated row to be displayed in the Report Script.
Syntax:
- {PRINTROW «Name of calculated row»}
Example:
- <ROW(Markets)
- {CALCULATE ROW “Total”}
- …
- …
- …
- {PRINTROW “Total”}
3.- SETROWOP
This command allows to define / change the operator to be used from that moment on in a previously defined CALCULATE ROW command.
Syntax:
- {SETROWOP “Name of calculated row” [Operator]}
Operator: The mathematical operators are the same as those that can be used in the {CALCULATE ROW} command.
Example:
- <ROW(Markets)
- {CALCULATE ROW “Total”}
- …
- …
- …
- {SETROWOP “Total” -}
- …
- …
4.- OFFROWCALCS / ONROWCALCS
OFFROWCALCS disables row calculation; the rows that follow are not computed in a previous CALCULATE ROW command (but what is already calculated is kept).
ONROWCALCS re-enables the calculation (disabled by the previous command): the rows that follow enter in the calculation.
Syntax:
- {OFFROWCALCS}
- {ONROWCALCS}
Example:
- <ROW(Markets)
- {CALCULATE ROW “Total”}
- …
- …
- {OFFROWCALCS}
- …
- …
- {ONROWCALCS}
- …
- …
- {PRINTROW “Total”}
5.- CLEARROWCALC / CLEARALLROWCALC
CLEARROWCALC: Clears a previous calculation from a calculated row and assigns it the value #missing. The syntax:
- {CLEARROWCALC «Name of calculated row»}
Example:
- <ROW(Markets)
- {CALCULATE ROW “Sales”}
- …
- …
- …
- {CLEARROWCALC “Sales”}
- …
- …
{CLEARALLROWCALC}: Clears all calculated rows and assigns them the value #missing. The syntax:
- {CLEARALLROWCALC}
II.- EXAMPLES
Let’s look at some examples of calculated rows:
a) We have a Report Script on sales with the following definition of rows:
- <ROW(Markets)
- Spain
- Germany
- France
We get the following output:

We include a row calculated to add the sales of the 3 markets:
- <ROW(Markets)
- {CALCULATE ROW “Total”}
- Spain
- Germany
- France
- {PRINTROW “Total”}
We get the following output

Some observations:
- The {CALCULATE ROW} command must come before the rows to be used in the calculation. For example, in the following definition, the calculated row would only add the sales of Germany and France:
- <ROW(Markets)
- Spain
- {CALCULATE ROW “Total”}
- Germany
- France
- {PRINTROW “Total”}
- Since we have not defined the default operator, the “+” operator has been applied.
- For the calculated row to be displayed in the Report Script, the {PRINTROW} command must be used.
b) Let’s see an example using the {SETROWOP} command: some members add and others subtract.
We have a Report Script on sales with the following definition of rows:
- <ROW(Markets)
- {CALCULATE ROW “Total”}
- Spain
- Germany
- France
- {SETROWOP “Total” -}
- Returns
- {PRINTROW “Total”}
We get the following output:

Some observations:
- We have used the {SETROWOP} command to change the operator applied in the calculation of the “Total” row.
- The “Total” row is calculated by adding Spain, Germany and France (default operator), and subtracting “Cancellations”.
c) We compute a computed row including some members and excluding others.
We have a Report Script on sales with the following definition of rows:
- <ROW(Markets)
- {CALCULATE ROW “Total”}
- Spain
- Germany
- {OFFROWCALCS}
- France
- China
- {ONROWCALCS}
- Japan
- India
- {PRINTROW “Total”}
We get the following output:

Some observations:
- The calculated row «Total» adds the sales of Spain, Germany, Japan and India (excludes the sales of France and China in the calculation).
d) We have a Report Script on sales with the following definition of rows:
- <ROW(Years,Markets)
- {CALCULATE ROW “Total~Sales”}
- “Year 2020”
- “Year 2021”
- Spain
- Germany
- France
- {PRINTROW “Total~Sales”}
We get the following output:

Some observations:
- Since there are 2 columns with row names (Years and Markets), when defining the name of the calculated row we have used 2 fields (Total and Sales) separated by the “~” sign.
e) We calculate 2 rows:
- <ROW(Years,Markets)
- {CALCULATE ROW “Total~Sales”}
- “Year 2020”
- “Year 2021”
- Spain
- Germany
- France
- {CALCULATE ROW “Target~Sales” = “Total~Sales” * 2}
- {PRINTROW “Total~Sales”}
- {PRINTROW “Target~Sales”}
We get the following output:

Some observations:
- Since the second calculated row is calculated from the first calculated row, this command must be included after this first row has been calculated (after the members that enter into the calculation of the first row).
f) We calculate 2 rows: in this second row we apply a different weight to each column:
- <ROW(Years,Markets)
- {CALCULATE ROW “Total~Sales”}
- “Year 2020”
- “Year 2021”
- Spain
- Germany
- France
- {CALCULATE ROW “Target~Sales” = “Total~Sales” * [0.5 1 2]}
- {PRINTROW “Total~Sales”}
- {PRINTROW “Target~Sales”}
The “Target~Sales” row is calculated in January by multiplying “Total~Sales” by 0.5, in February by multiplying by 1, and in March by multiplying by 2.
We get the following output:

g) Use of the command {CLEARROWCALC}: we calculate 2 partial sums:
Starting from the following Report Script:

We are going to include two partial sums:
- <ROW(Markets)
- {CALCULATE ROW “Sales”}
- Spain
- Germany
- France
- {PRINTROW “Sales”}
- {CLEARROWCALC “Sales”}
- China
- Japan
- India
- {PRINTROW “Sales”}
We get the following output:

Some observations:
- After the first partial addition, we include the {CLEARROWCALC} command to cancel the above (set the sum to zero) and start adding from the next member. If we do not include this command, the second partial sum gives an erroneous value (it would add the sales of the 6 markets).
h) We calculate 2 partial sums and a total sum:
Starting from the following Report Script:

We are going to include two partial sums and one total sum:
- <ROW(Markets)
- {CALCULATE ROW “Europe”}
- Spain
- Germany
- France
- {PRINTROW “Europe”}
- {CALCULATE ROW “Europe” OFF}
- {CALCULATE ROW “Asia”}
- China
- Japan
- India
- {PRINTROW “Asia”}
- {CALCULATE ROW “Asia” OFF}
- {CALCULATE ROW “Total” = “Europe” + “Asia”}
- {PRINTROW “Total”}
We get the following output:

Some observations:
- After performing the partial sums, we disconnect these calculations with the “OFF” option, otherwise the total calculation would be incorrect (it would take the sum of the 6 markets for Europe).
- We could also have used the {SETROWOP} command.
i) We calculate the sum of 3 columns and the % that the sum of each column represents over the total
We are going to include two partial sums and one total sum:
- <ROW(Markets)
- {CALCULATE ROW “Sales”}
- Spain
- Germany
- France
- China
- Japan
- India
- {PRINTROW “Sales”}
- {CALCULATE ROW “1Q” = “Sales” 1 + “Sales” 2 + “Sales” 3}
- {CALCULATE ROW “% 1T” = “Sales” * 100 / “1T”}
- {PRINTROW “% 1T”}
We get the following output:

Some observations:
- We calculate 3 rows:
- The first row calculated “Sales” is the sum of all markets.
- The second calculated row «1Q» is the sum of the totals of the 3 months: add the data of January «Sales» 1, February «Sales» 2 and March «Sales» 3 (the number identifies the column according to your original order). It is a support row that is not published in the Report Script (we have put it in red) since it is not included in a {PRINTROW} command.
- The third calculated row “% 1T” calculates the % of the “Sales” row with respect to the “1T” row.
III.- SAVEROW / SAVEANDOUTPUT
This command creates a new calculated row by assigning the value of a member to it.
Syntax:
- {SAVEROW [“New calculated row name”]} Member name !
New Calculated Row Name: This is optional; it is the name we give to the new calculated row; must be between “ “.
Member name: It is the name of the member whose value we assign to this calculated row.
- It is the name that the row takes by default if a new name has not been specified.
Example:
- {SAVEROW “Total”} Europe !
We create a calculated row called “Total” to which we assign the value of the member “Europe”.
The {SAVEROW} command creates the calculated row but does not display it in the Report Script; if we want it to be displayed we have to use the {PRINTROW} command.
Example:
- <ROW(Markets)
- {SAVEROW “Total”} Europe !
- …
- …
- …
- {PRINTROW “Total”}
The great utility of this command is that we can use this new calculated row as a reference for calculations, something that we cannot do directly with the member data.
Let’s look at an example:
- <COLUMN(“Months”)
- January
- February
- March
- <ROW(Markets)
- {SAVEROW “Total”} Europe !
- {CALCULATE COLUMN “% January” = 1 % “Total” 1}
- Spain
- Germany
- France
- Europe
We get the following output:

Comments:
- We have created a new row “Total” to which we assign the value of the member “Europe” and that we use to calculate the % that the sales of January of each country represent on the sales of Europe of that month.
- This previous calculation cannot be carried out directly on the “Europe” data; we have to create this new row.
- In the formula used {CALCULATE COLUMN “% January” = 1 % “Total” 1} the column “% January” is calculated as a percentage of column 1 (January) over the data in the “Total” row in column 1.
- Since we have not used the {PRINTROW} command, the “Total” row does not appear in the Report Script.
The {SAVEONDOUTPUT} command works exactly the same as the previous one but with the difference that it is displayed directly in the Report Script.
- We do not have to use the {PRINTROW} command.
Syntax:
- {SAVEONDOUTPUT [“New calculated row name”]} Member name !
Any question, please send an email to: essbaseeasy@gmail.com
Español
En esta lección vamos a analizar los siguientes puntos:
- I.- COMANDOS
- CALCULATE ROW
- PRINTROW
- SETROWOP
- OFFROWCALCS
- ONROWCALCS
- CLEARROWCALC
- CLEARALLROWCALC
- II.- EJEMPLOS
- III.- OTROS COMANDOS
- SAVEROW
- SAVEONDOUTPUT
I.- COMANDOS
1.- CALCULATE ROW
Este comando permite incluir una nueva fila calculada en el Report Script.
- Es útil para agregar filas y obtener subtotales o totales.
- Este comando se incluye antes de las filas que va a utilizar en el cálculo.
- Este comando calcula la fila pero no la muestra en el Report Script; para que figure hay que utilizar el comando {PRINTROW}.
- Para que funcione este comando la definición de la sección <COLUMN debe ir antes que la definición de la sección <ROW.
Sintaxis: caben 2 posibilidades:
- {CALCULATE ROW “Nueva Fila” [“Operador”]}
- {CALCULATE ROW “Nueva Fila” [“Número de columna”] = “Expresión”}
Nueva Fila: es el nombre de la nueva fila que se va a incluir en el Report Script; debe ir entre “ “.
- Si hay varias columnas con nombres de filas, en el nombre de la nueva fila hay que recoger todos estos campos separando cada campo con el signo “~“.
- Por ejemplo: supongamos que hay dos columnas con nombres de filas correspondientes a las dimensiones “Mercados” e “Indicadores”, en la nueva fila calculada tenemos que recoger un nombre para cada columna:
- {CALCULATE ROW “Total~Ventas”}
Operador: es optativo y define el operador matemático que se va a aplicar:
- Los operadores matemáticos que se pueden utilizar: + , – , * , / , %x%y (calcula x como un % de y).
- OFF: detiene el cálculo.
- Si no se define se aplica por defecto la suma.
Nº columna: es opcional, indica para que columna de datos se va a calcular la nueva fila; si no se específica se calcula para todas las columnas.
Expresión:
- Se calculan de izquierda a derecha.
- No se pueden utilizar paréntesis.
- No pueden contener nombres de miembros.
- Número de columnas: se definen con un número que hace referencia a su orden original en el Report Script.
- Números: pueden ser con decimales (por ejemplo: 0.07) o números enteros (a los que hay que poner un “.” (por ejemplo: 7.) para diferenciarlos de una referencia a una columna.
Ejemplos: el siguiente ejemplo calcula una nueva fila que se denomina “Total” y que calcula como suma (al no definirse operador es el que aplica por defecto) de los miembros que van a continuación.
- {CALCULATE ROW “Total”}
- …
- …
- …
Otro ejemplo: Calcula una fila “Europa” como suma de los miembros que siguen, otra “Asia” de la misma forma y una última “Total” como suma de las 2 filas anteriores.
- {CALCULATE ROW “Europa”}
- …
- …
- {CALCULATE ROW “Asia”}
- …
- …
- {CALCULATE ROW “Total” = “Europa” + “Asia”}
Si en el ejemplo anterior hubiéramos definido {CALCULATE ROW “Total” 3 = “Europa” + “Asia”} la nueva fila calculada únicamente se calcularía para la columna 3ª.
2.- PRINTROW
Este comando da la instrucción para que la nueva fila calculada se muestre en el Report Script.
Sintaxis:
- {PRINTROW “Nombre de fila calculada”}
Ejemplo:
- <ROW(Mercados)
- {CALCULATE ROW “Total”}
- …
- …
- …
- {PRINTROW “Total”}
3.- SETROWOP
Este comando permite definir / cambiar el operador que se va a utilizar a partir de ese momento en un comando CALCULATE ROW definido anteriormente.
Sintaxis:
- {SETROWOP “Nombre de fila calculada” [Operador]}
Operador: Los operadores matemáticos son los mismos que se pueden utilizar en el comando {CALCULATE ROW}.
Ejemplo:
- <ROW(Mercados)
- {CALCULATE ROW “Total”}
- …
- …
- …
- {SETROWOP “Total” -}
- …
- …
4.- OFFROWCALCS / ONROWCALCS
OFFROWCALCS deshabilita el cálculo de filas; las filas que vienen a continuación no computan en un comando CALCULATE ROW anterior (pero lo ya calculado se mantiene).
ONROWCALCS habilita nuevamente el cálculo (deshabilitado por el comando anterior): las filas que vienen a continuación entran en el cálculo.
Sintaxis:
- {OFFROWCALCS}
- {ONROWCALCS}
Ejemplo:
- <ROW(Mercados)
- {CALCULATE ROW “Total”}
- …
- …
- {OFFROWCALCS}
- …
- …
- {ONROWCALCS}
- …
- …
- {PRINTROW “Total”}
5.- CLEARROWCALC / CLEARALLROWCALC
CLEARROWCALC: Borra un cálculo anterior de una fila calculada y le asigna el valor #missing. Su sintaxis:
- {CLEARROWCALC “Nombre fila calculada”}
Ejemplo:
- <ROW(Mercados)
- {CALCULATE ROW “Ventas”}
- …
- …
- …
- {CLEARROWCALC “Ventas”}
- …
- …
{CLEARALLROWCALC}: Borra todas las filas calculadas y les asigna el valor #missing. Su sintaxis:
- {CLEARALLROWCALC}
II.- EJEMPLOS
Veamos algunos ejemplos de filas calculadas:
a) Tenemos un Report Script sobre ventas con la siguiente definición de filas:
- <ROW(Mercados)
- España
- Alemania
- Francia
Obtenemos la siguiente salida:

Incluimos una fila calculada para que sume las ventas de los 3 mercados:
- <ROW(Mercados)
- {CALCULATE ROW “Total”}
- España
- Alemania
- Francia
- {PRINTROW “Total”}
Obtenemos la siguiente salida

Algunas observaciones:
- El comando {CALCULATE ROW} debe ir antes de las filas que se van a utilizar en el cálculo. Por ejemplo, en la siguiente definición la fila calculada tan sólo sumaria las ventas de Alemania y Francia:
- <ROW(Mercados)
- España
- {CALCULATE ROW “Total”}
- Alemania
- Francia
- {PRINTROW “Total”}
- Como no hemos definido operador por defecto ha aplicado el operador “+”.
- Para que la fila calculada se muestre en el Report Script hay que utilizar el comando {PRINTROW}.
b) Veamos un ejemplo utilizando el comando {SETROWOP}: algunos miembros van sumando y otros restando.
Tenemos un Report Script sobre ventas con la siguiente definición de filas:
- <ROW(Mercados)
- {CALCULATE ROW “Total”}
- España
- Alemania
- Francia
- {SETROWOP “Total” -}
- Devoluciones
- {PRINTROW “Total”}
Obtenemos la siguiente salida:

Algunas observaciones:
- Hemo sutilizado el comando {SETROWOP} para cambiar el operador aplicado en el cálculo de la fila “Total”.
- La fila “Total” se calcula sumando España, Alemania y Francia (operador por defecto), y restando “Anulaciones”.
c) Calculamos una fila calculada incluyendo algunos miembros y excluyendo otros.
Tenemos un Report Script sobre ventas con la siguiente definición de filas:
- <ROW(Mercados)
- {CALCULATE ROW “Total”}
- España
- Alemania
- {OFFROWCALCS}
- Francia
- China
- {ONROWCALCS}
- Japón
- India
- {PRINTROW “Total”}
Obtenemos la siguiente salida:

Algunas observaciones:
- La fila calculada “Total” suma las ventas de España, Alemania, Japón e India (excluye en el cálculo las ventas de Francia y China).
d) Tenemos un Report Script sobre ventas con la siguiente definición de filas:
- <ROW(Años,Mercados)
- {CALCULATE ROW “Total~Ventas”}
- “Año 2020”
- “Año 2021”
- España
- Alemania
- Francia
- {PRINTROW “Total~Ventas”}
Obtenemos la siguiente salida:

Algunas observaciones:
- Al haber 2 columnas con nombre de filas (Años y Mercados), al definir el nombre de la fila calculada hemos utilizado 2 campos (Total y Ventas) separados por el signo “~”.
e) Calculamos 2 filas:
- <ROW(Años,Mercados)
- {CALCULATE ROW “Total~Ventas”}
- “Año 2020”
- “Año 2021”
- España
- Alemania
- Francia
- {CALCULATE ROW “Objetivo~Ventas” = “Total~Ventas” * 2}
- {PRINTROW “Total~Ventas”}
- {PRINTROW “Objetivo~Ventas”}
Obtenemos la siguiente salida:

Algunas observaciones:
- Como la segunda fila calculada se calcula a partir de la primera fila calculada, este comando hay que incluirlo después de haber calculado esta primera fila (es decir, después de los miembros que entran en el cálculo de la primera fila).
f) Calculamos 2 filas: en esta segunda fila aplicamos a cada columna una ponderación diferente:
- <ROW(Años,Mercados)
- {CALCULATE ROW “Total~Ventas”}
- “Año 2020”
- “Año 2021”
- España
- Alemania
- Francia
- {CALCULATE ROW “Objetivo~Ventas” = “Total~Ventas” * [0.5 1 2]}
- {PRINTROW “Total~Ventas”}
- {PRINTROW “Objetivo~Ventas”}
La fila “Objetivo~Ventas” se calcula en enero multiplicando “Total~Ventas” por 0,5, en febrero multiplicando por 1, y en marzo multiplicando por 2.
Obtenemos la siguiente salida:

g) Uso del comando {CLEARROWCALC}: calculamos 2 sumas parciales:
Partiendo del siguiente Report Script:

Vamos a incluir dos sumas parciales:
- <ROW(Mercados)
- {CALCULATE ROW “Ventas”}
- España
- Alemania
- Francia
- {PRINTROW “Ventas”}
- {CLEARROWCALC “Ventas”}
- China
- Japón
- India
- {PRINTROW “Ventas”}
Obtenemos la siguiente salida:

Algunas observaciones:
- Tras la primera suma parcial incluimos el comando {CLEARROWCALC} para anular lo anterior (poner la suma a cero) y comenzar a sumar a partir del siguiente miembro. Si no incluimos este comando la segunda suma parcial da un valor erróneo (sumaría las ventas de los 6 mercados).
h) Calculamos 2 sumas parciales y una suma total:
Partiendo del siguiente Report Script:

Vamos a incluir dos sumas parciales y una suma total:
- <ROW(Mercados)
- {CALCULATE ROW “Europa”}
- España
- Alemania
- Francia
- {PRINTROW “Europa”}
- {CALCULATE ROW “Europa” OFF}
- {CALCULATE ROW “Asia”}
- China
- Japón
- India
- {PRINTROW “Asia”}
- {CALCULATE ROW “Asia” OFF}
- {CALCULATE ROW “Total” = “Europa” + “Asia”}
- {PRINTROW “Total”}
Obtenemos la siguiente salida:

Algunas observaciones:
- Tras realizar las sumas parciales desconectamos estos cálculos con la opción “OFF”, si no el cálculo total sería incorrecto (tomaría para Europa la suma de los 6 mercados).
- También podríamos haber utilizado el comando {SETROWOP}.
i) Calculamos la suma de 3 columnas y el % que la suma de cada columna representa sobre el total
Vamos a incluir dos sumas parciales y una suma total:
- <ROW(Mercados)
- {CALCULATE ROW “Ventas”}
- España
- Alemania
- Francia
- China
- Japón
- India
- {PRINTROW “Ventas”}
- {CALCULATE ROW “1T” = “Ventas” 1 + “Ventas” 2 + “Ventas” 3}
- {CALCULATE ROW “% 1T” = “Ventas” * 100 / “1T”}
- {PRINTROW “% 1T”}
Obtenemos la siguiente salida:

Algunas observaciones:
- Calculamos 3 filas:
- La primera fila calculada “Ventas” es la suma de todos los mercados.
- La segunda fila calculada “1T” es la suma de los totales de los 3 meses: suma el dato de la Enero “Ventas” 1, de febrero “Ventas” 2 y de marzo “Ventas” 3 (el número identifica a la columna según su orden original). Es una fila de apoyo que no se publica en el Report Script (la hemos puesto en rojo) ya que no se recoge en un comando {PRINTROW}.
- La tercera fila calculada “% 1T” calcula el % de la fila “Ventas” respecto a la fila “1T”.
III.- SAVEROW / SAVEANDOUTPUT
Este comando crea una nueva fila calculada asignándole el valor de un miembro.
Sintaxis:
- {SAVEROW [“Nuevo nombre de fila calculada”]} Nombre del miembro !
Nuevo nombre de fila calculada: es opcional; es el nombre que le damos a la nueva fila calculada; debe ir entre “ “.
Nombre del miembro: Es el nombre del miembro cuyo valor le asignamos a esta fila calculada.
- Es el nombre que la fila toma por defecto si no se ha especificado un nombre nuevo.
Ejemplo:
- {SAVEROW “Total”} Europa !
Creamos una fila calculada que se denomina “Total” a la que le asignamos el valor del miembro “Europa”.
El comando {SAVEROW} crea la fila calculada pero no la muestra en el Report Script; si queremos que se muestre tenemos que utilizar el comando {PRINTROW}.
Ejemplo:
- <ROW(Mercados)
- {SAVEROW “Total”} Europa !
- …
- …
- …
- {PRINTROW “Total”}
La gran utilidad de este comando es que esta nueva fila calculada la podemos utilizar como referencia para cálculos, algo que no podemos realizar directamente con el dato del miembro.
Veamos un ejemplo:
- <COLUMN(“Meses”)
- Enero
- Febrero
- Marzo
- <ROW(Mercados)
- {SAVEROW “Total”} Europa !
- {CALCULATE COLUMN “% Enero” = 1 % “Total” 1}
- España
- Alemania
- Francia
- Europa
Obtenemos la siguiente salida:

Comentarios:
- Hemos creado una nueva fila “Total” a la que le asignamos el valor del miembro “Europa” y que utilizamos para calcular el % que las ventas de enero de cada país representan sobre las ventas de Europa de ese mes.
- Este cálculo anterior no lo podemos realizar directamente sobre el dato de “Europa”; hay que crear esta nueva fila.
- En la fórmula utilizada {CALCULATE COLUMN “% Enero” = 1 % “Total” 1} la columna “% Enero” se calcula como porcentaje de la columna 1 (Enero) sobre el dato de la fila “Total” en la columna 1.
- Como no hemos utilizado el comando {PRINTROW} la fila “Total” no figura en el Report Script.
El comando {SAVEONDOUTPUT} funciona exactamente igual que el anterior pero con la diferencia de que lo muestra directamente en el Report Script.
- No hay que utilizar el comando {PRINTROW}.
Sintaxis:
- {SAVEONDOUTPUT [“Nuevo nombre de fila calculada”]} Nombre del miembro !
Cualquier consulta envía, por favor, un correo a: essbaseeasy@gmail.com