FORCHILDREN

Syntax

FORCHILDREN (Dimension, Expression, {#DIRECT/#ALL/#DETAILS, {Parent Member}})

Note:

The third and fourth arguments are optional.

Description

The FORCHILDREN function loops through all child members of a dimension's parent member, unless you interrupt the FORCHILDREN function with a BREAK function.

Parameters

The FORCHILDREN function takes two required arguments and two optional arguments. The first and second arguments are required. The third and fourth arguments are optional.

Parameter Description

Dimension

The dimension to use.

Expression

The expression to evaluate for each iteration.

#DIRECT, #ALL, #DETAILS

This argument is optional. Select from one of these predefined constants.

Note: #DIRECT is the default constant.

Parent Member

This argument is optional. If you do not use this argument, the function applies to the member that is currently being evaluated.

Example

FORCHILDREN(Region, 
		  IF(Sales > & MaxSales,
			&MaxSales := Sales;
			&Region:= Member;
		),
		#DIRECT,
		[Region:USA]
	);
  &Region;

Related Topics