Generate

Generate

Applies a set to each member of another set, and then joins the resulting sets by union. Alternatively, this function returns a concatenated string created by evaluating a string expression over a set.

Syntax

Set expression syntax Generate( Set_Expression1 , Set_Expression2 , ALL ) String expression syntax Generate( Set_Expression1 , String_Expression , Delimiter )

Arguments

Set_Expression1

MDX expression that returns a set.

Set_Expression2

MDX expression that returns a set.

String_Expression

String expression

Delimiter

A valid delimiter expressed as a string expression.

Examples

Following example returns the names of all Invoices for each Invoice type. 

Generate( Filter(NonEmptyCrossJoin([Invoice].[Invoice].Members, [Measures].DefaultMember), [Measures].[Invoice Type] = [Invoice Type].CurrentMember.Name), [Invoice].CurrentMember.Name, ', ' )