@ISANCEST / @ISIANCEST

English (Español a continuación)

It is a Boolean function that returns «True», if the calculated member fulfills the function’s argument, or «False» otherwise.

Its structure consists of a single argument:

@ISANCEST (Argument);

  • This argument selects an element of the outline (for example, “Madrid”) or a function that returns a member (for example, @PARENT (“Madrid”)). If the calculated member is the ancestor of that element, the function returns «True»; if it is not, it returns «False».

For example:

@ISANCEST (“Barcelona”);

  • IF the calculated member is an ancestor of «Barcelona» this function returns «True», otherwise it returns «False».

The difference between @ISANCEST / @ISIANCEST is that the first one does not include the member collected in the function (in the example above Barcelona) among the members that meet the condition, while the second function does.

This function is usually used within an «IF» structure:

  • IF (@ISANCEST (“Barcelona”))
  • Sales = 50;
  • ENDIF

This function applied to the following outline would result in:

While the following example:

  • IF (@ISIANCEST (“Barcelona”))
  • Sales = 50;
  • ENDIF

It would result in:

Español

Es una función booleana que devuelve “Verdadero”, si el miembro calculado cumple el argumento de la función, o “Falso”, en caso contrario.

Su estructura consta de un solo argumento:

@ISANCEST(Argumento);

Este argumento recoge un elemento del outline (por ejemplo, “Madrid”) o una función que devuelve un miembro (por ejemplo, @PARENT(“Madrid”)). Si el miembro calculado es ascendiente de dicho elemento la función devuelve “Verdadero”; si no lo es devuelve “Falso”.

Por ejemplo:

  • @ISANCEST (“Barcelona”);

SI el miembro calculado es ascendiente de “Barcelona” esta función devuelve “Verdadero”, en caso contrario devuelve “Falso”.

La diferencia entre @ISANCEST / @ISIANCEST es que la primera no incluye entre los miembros que cumplen la condición al miembro recogido en la función (en el ejemplo anterior Barcelona), mientras que la segunda función sí lo incluye.

Esta función se suele utilizar dentro de una estructura “IF”:

IF(@ISANCEST(“Barcelona”))

Ventas = 50;

ENDIF

Esta función aplicada al siguiente outline daría como resultado:

Mientras que el siguiente ejemplo:

IF(@ISIANCEST(“Barcelona”))

Ventas = 50;

ENDIF

Daría como resultado:

Anuncio publicitario