InterSystems IRIS Data Platform 2019.2  /  InterSystems MDX Reference  /  MDX Functions

InterSystems MDX Reference
Previous section           Next section
InterSystems: The power behind what matters   

Enables you to create a set of members based on a term list. When used with the %OR function, %TERMLIST is particularly useful for filtering. This function is an InterSystems extension to MDX.
Returned Type
This function returns a set.
Syntax and Details
%TERMLIST(term_list_name, flag)
This function returns a set that, by default, consists of members that are identified by the key values in the term list, in combination with the term list pattern. The term list pattern indicates the level to which the members belong, and indicates how to create the full identifiers for the members.
If you specify flag as "EXCLUDE", the set instead consists of all members of the given level except for the ones identified in the term list.
For information on defining term lists, see “Defining Term Lists” in Advanced Modeling for InterSystems Business Intelligence.
For example, suppose that for HoleFoods, we have a term list named MyCities that is defined as follows:
Suppose that this term list has the following Pattern expression:
Then for this term list, the %TERMLIST function returns a set that consists of the Atlanta, Boston, and New York members of the City level. That is, the following two expressions are equivalent:
{[Outlet].[H1].[City].[Atlanta],[Outlet].[H1].[City].[Boston],[Outlet].[H1].[City].[New York]}
When used with the %OR function, %TERMLIST is particularly useful for filtering. For example:
SELECT FROM holefoods %FILTER %OR(%TERMLIST("MyCities"))
See Also

Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-10-18 06:48:41