Data Item Time Filter Use Cases.

1) Applying a FirstLastPeriods filter using nPeriods = 5, searchDirection= 'FORWARD', levelName = 'Time.YQMD.[Month_Name]'

> Sample Code to use:

> int nPeriods = 0;

> String searchDirection = "FORWARD";

> String levelName = "[Time].[YQMD].[Month_Name]";

> DataItemTimeFirstLastPeriodsFilter step = new DataItemTimeFirstLastPeriodsFilter(nPeriods, searchDirection, levelName );

> dataItem.addStep(step) <<=== where dataitem is Year-Quarter-Month-Day (a Date/Time Dimension)

2) Applying a NParallelPeriods filter using nPeriods = 0, searchDirection= 'FORWARD', levelName = 'Time.YQMD.[Month_Name]'date = '[Time].[YQMD].[All YQMD].[1998].[1998Q1].[February]'

> Sample Code to use:

> String searchDirection = "FORWARD";

> String levelName = "[Time].[YQMD].[Month_Name]";

> String date = "[Time].[YQMD].[All YQMD].[1998].[1998Q1].[February]";

> DataItemTimeNParallelPeriodsFilter step = new DataItemTimeNParallelPeriodsFilter(nPeriods, searchDirection, levelName, date );

> dataItem.addStep(step) <<=== where dataitem is Year-Quarter-Month-Day (a Date/Time Dimension)

3) Applying a NPeriods filter using nPeriods = 5, searchDirection= 'FORWARD', date = '[Time].[YQMD].[All YQMD].[1998].[1998Q1].[February]'

> Sample Code to use:

> int nPeriods = 5;

> String searchDirection = "FORWARD";

> String date = "[Time].[YQMD].[All YQMD].[1998].[1998Q1].[February]";

> DataItemTimeNPeriodsFilter step = new DataItemTimeNPeriodsFilter(nPeriods, searchDirection,date );

> dataItem.addStep(step) <<=== where dataitem is Year-Quarter-Month-Day (a Date/Time Dimension)