***  This package is subject to change.  ***

Note:
Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

Package com.sas.iquery.metadata.business.step.olap

Provides a set of modeled "step" operations that can be applied, in a particular order, to OLAP data items and business queries in order to filter the data that gets returned when business queries are executed.

See:
          Description

Class Summary
BaseFilter An abstract class that represents a step that filters.
BusinessQueryDataBasedFilter A step that filters a query based on a boolean expression.
BusinessQueryRankFilter A step that ranks a business query based on a ranking criteria.
BusinessQueryTupleFilter A step that filters out a specific set of member for a set of dimension(s) and a single measure.
DataItemMemberFilter A step that filters a data item based on a particular member or set of members.
DataItemMemberPropertiesFilter A step that filters member properties set on a data item based on a boolean expression.
DataItemNavigationFilter A step that filters a data item based on a specific kind of navigation on a particular member.
DataItemRankFilter A step that ranks a data item based on a ranking criteria.
DataItemTimeFilter A step that filters a data item based on time members and time function arguments submitted.
DataItemTimeFirstLastPeriodsFilter A step that filters a data item to reflect requests for the first or last specified number of members at a level.
DataItemTimeNParallelPeriodsFilter A step that filters a data item to reflect N periods parallel to a given date member.
DataItemTimeNPeriodsFilter A step that filters a data item to reflect requests for the first or last N members at a level.
DataItemTimeRangeFilter A step that filters a data item based on start and end date period or can filter based where either the start or end (or both) members are relative.
PromptedTimeRangeFilter A prompted step that filters a data item based on start and end date period or can filter based where either the start or end (or both) members are relative.
TupleFilterMemberQualifier This class defines a single qualifier for a business query tuple filter that represents a catagory dataItem and a member string expression.
 

Package com.sas.iquery.metadata.business.step.olap Description

Provides a set of modeled "step" operations that can be applied, in a particular order, to OLAP data items and business queries in order to filter the data that gets returned when business queries are executed.

OLAP Steps are a collection of defined operations that modifies the state of an OLAP data item or business query.

A step or steps can be applied to a data item or business query by using the appropriate setSteps() methods. The BaseFilter is an abstract class that represents a step that filters either the data item or the business query. It is the super class for each of the types of filters that can be applied.

DataItemRankFilter and BusinessQueryRankFilter

TopPercent or BottomPercent filtering returns the top or bottom tuples of a set, based on a measure (if specified). The cells or expression are summed over the set, and the top or bottom set of elements whose cumulative total of the numeric expression is at least percentage is returned. Percentage is a numeric expression. TopSum and BottomSum filtering return the subset of a set (after sorting it), such that the sum of the measure is at least value. TopCount and BottomCount filtering returns the top or bottom items that are found after sorting the set. The set is sorted on the measure (if a measure is supplied). If there is no measure, then the cells that are found in the evaluation context are used. The TopCount returns elements in order from largest to smallest in terms of the measure that was used (if a measure was specified). The BottomCount returns them in order from smallest to largest.

If you look at the MDDBCARS cube, you can see:
        Chevy Chrysler Ford Toyota
sales_n     2               2         7         9
Toyota has 9 which is 45% of the total.   
 
If we now add a TopPercent to the query for 45% we'll see:
              Toyota
SALES_N          9
If we change the query to 46%, we'll see:

              Toyota         Ford
SALES_N            9            7

  
Even though Toyota and Ford really are 80% of the total.  BottomPercent works the same way. If you look at the data, Chrysler is 10% of the total.  

When you see:

            Chrysler
SALES_N            2
 
and changing it from 10% to 11%:
      Chrysler Chevy
sales_n        2           2

 

Example 1 of Ranking:

Top 2 Count (not including ties) based on Sum Of Sales.  Rank is applied to the ROW axis of the crossing of dealer and car based on the value of Sum Of Sales.

Example 2 of Ranking:

Top 1 Count (not including ties) based on Finch.Sum Of Sales. Rank is applied to the set - CAR based on the Sum Of Sales Value within the Dealer Finch.

 

Note:  If  a rank criteria containing members from the same dimension that is ranked and you select a Top Count of two, you would receive the two tuples with the largest values.

Note:  If a measure is not applied as a "byRank" qualifier, IQ will peform the best guess.  This will mean that IQ will apply default measure.  The recommendation is to always apply a measure as a "byRank" qualifier. 

An example of not using a Measure in a byRank qualifier is:

DataItemRankFilter is based on a single data item being used in the set.

BusinessQueryRankFilter is based on a cross join (cross join generates the product of two input sets. If two sets exist in two independent dimensions, the product consists of all of the combinations of the members in the two dimensions) being used in the set.

For a definition of how OLAP rank filtering for data item can be applied and how it will appear, see Use Cases.

For a definition of how OLAP rank filtering for business query can be applied and how it will appear, see Use Cases.

BusinessQueryDatabasedFilter

This Data based filter is used to filter a cross join (cross join generates the product of two input sets. If two sets exist in two independent dimensions, the product consists of all of the combinations of the members in the two dimensions) based on the value in the measure. For a definition of data-based filtering for a data item can be applied and how it will appear, see Use Cases.

DataItemNavigationFilter

Data item may be filter based on a specific kind of navigation on a particular member. There are a few types of navigation filters, each of which returns a different set of members. In order to navigate through the data, a hierarchy filter must be defined, or a hierarchy will need to be specified as part of this filter. For a definition of how navigation filtering for a data item can be applied and how it will appear, see Use Cases.

DataItemMemberFilter

The member filter is used to filter a data item based on a particular member or set of members. The can be done by select one specific member, a collection of members, or a range of member (The members of a level are arranged in a particular order. Therefore, we can specify a set as a range of members in that order by listing two members from the same levels as endpoints). A data item can be filter based on the definition of a set.  A set is a collection of tuples. This set can be defined a list of members or a range of members. For example, a data item of "Year" can be restricted by applying a list such as "{[TIME].[1997], [TIME].[1998]}" or a range such as "{[TIME].[1997]:[TIME].[1998]}". 

MDX examples of member filtering are: 

  • A single member would be defined as "[Time].[All Time].[January]".
  • A list of members would be defined as "[Time].[All Time].[Feburary], [Time].[All Time].[January], [Time].[All Time].[March]"
  • A range of member would be defined as "[Time].[All Time].[January]:[Time].[All Time].[April]".

For a definition of member filtering for a data item can be applied and how it will appear, see Use Cases.

DataItemMemberPropertiesFilter

Member properties provide additional attributes for a given member level in a dimension. A property name may be a string expression. Generally, it will be a constant string (like zip code), but it may also be a string-valued expression.  A member property is defined for a single level of dimension. On whatever axis a dimension is mapped (either row or cColumn), you can query one or more member properties.  If you are trying to filter out of a set the member that have certain property value (retain all of the other), of the members at the higher level don't have the wrong property value. A filter expression is created that will retain these member or filter them out.   

Example of a simple member property - filter([CUSTOMER].[REGION].members, [customer].currentmember.properties("education") = "Masters")

For a definition of member filtering for a data item can be applied and how it will appear, see Use Cases.

 

        DataItemTimeFilter, DataItemTimeFirstLastPeriodsFilter, DataItemTimeNParallelPeriodsFilter, DataItemTimeNPeriodsFilter, and DataItemTimeRangeFilter

DataItemTimeMemberFilter filters a data item based on Time members and Time function arguments submitted. It is the super class for all Time-based filtering operations. The following types of DataItemTimeMemberFilters are:

DataItemTimeFirstLastPeriodsFilter filters a data item to reflect requests for first or last N members at a level. For example, by applying last period and the value 3 to the variable of  N to  [TIME].[1987].[Quarter 2] would return the three periods starting with Quarter 4 of 21986 through Quarter 2of 1987.  By applying first period to [TIME].[QUARTER].[1986] would return the preceding expression because it is the first period at the Quarter level below 1986.

DataItemTimeNParallelPeriodsFilter filters a data item to reflect N periods parallel to a given date member. For example, by applying 3 to parallel periods of [QUARTER] starting at [TIME].[1987].[QUARTER 4].[OCTOBER]  would locate the sibling of the quarter-level ancestor of October in Quarter 4 of 1987, move three quarters back, and return the cousin of October 1987 in that quarter.  The quarter three quarters back is Quarter 1, 1987 and the month returned is January.

DataItemTimeNPeriodsFilter  filters a data item to reflect requests for N members at a level. For example, by applying 1 to the [TIME].[YEAR] level, will result in a time dimension filter where the year level is the first one down from the root level.

DataItemTimeRangeFilter filters a DataItem to model a set containing a defined range of members, including  periods to date.  This filter will return the number of periods with <level> up to and including <member>.  For example, by applying [TIME].[1987].[QUARTER 1]:[TIME].[1987].[QUARTER 4], your set will contain member from the Time dimension beginning with Quarter 1 in 1987 and ending with Quarter 4 inclusive.

For a definition of time filtering for a data item can be applied and how it will appear, see Use Cases.

 

 

 

 


***  This package is subject to change.  ***

Note:
Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.