Data Item Data Based Filter Use Cases.

A Data based filter is being applied to a data item based on the value in [Measures].[SALES_SUM] being greater than 4000.

MDX Generated:

> WITH SET [DATAITEM_DTE] AS '[DATE].[DTE].MEMBERS'

> SET [DATAITEM_CAR] AS ' FILTER({[CARS].[CAR].MEMBERS}, ([Measures].[SALES_SUM] > 4000))'

> MEMBER [Measures].[SALES_SUM] AS '[Measures].[SALES_SUM]'

> SELECT CROSSJOIN({[DATAITEM_DTE]}, {[DATAITEM_CAR]}) ON ROWS, {[Measures].[SALES_SUM]} ON COLUMNS FROM MDDBCARS

Sample Code to use:

> ComparisonOperator operator = ComparisonOperator.COMPARE_GT;

> String[] measures = { measure };<<== where name is [Measures].[SALES_SUM]

> int val = 4000;

> Integer vall = new Integer(val);

> Object value = (Object) vall;

> DataItemDataBasedFilter step = new DataItemDataBasedFilter(measures, operator, value);

> dataItem.addStep(step); <<== Where dataitem is CARS dimension