Create offline cube files (.cub) with OlapCube. Download Now!

table of contents


Returns the set resulting from filtering a specified set based on a search condition.


Filter(«Set», «Search Condition»)


The Filter function evaluates a Multidimensional Expressions (MDX) logical expression, specified in «Search Condition», against each member of the set specified in «Set», returning the set of members that met the search condition.

The Filter function works in a fashion similar to that of the IIf function. While the IIf function returns only one of two options based on the evaluation of an MDX logical expression, the Filter function returns a set of members that meet the specified search condition. In effect, the Filter function executes IIf(«Search Criteria», «Member», NULL) on each member in the set and returns the resulting set. If none of the members meet the search condition, an empty set is returned.


The following example returns {Paris, Buffalo} if these cities declined in sales from the 1995 to the 1996 level:

Filter(SampleSet, (Sales,[1996]) < (Sales, [1995]))

See Also