Go to primary content

Qualify Measure

Limits the values of a measure to those for a single hierarchy member.

The template presents a measure of the analytic view, a hierarchy used by the analytic view, and a member of the hierarchy. To select a different measure, hierarchy, or member, click an underlined value in the template and make a selection from the drop-down list.

Template

Qualify the measure name measure by the hierarchy alias hierarchy for member member name.

Example: Example of Qualify Measure

The SALES_2012 calculated measure returns the sales for the year 2012.

Calculation in Template

Qualify the SALES measure by the TIME_ATTR_DIM.TIME_HIER hierarchy for member YEAR[‘CY2012’]

Definition of Calculated Measure in Analytic View

The MEASURES clause of the SALES_AV analytic view definition includes this definition of the SALES_2012 calculated measure:

  SALES_2012 AS
    QUALIFY (SALES , TIME_ATTR_DIM.TIME_HIER = YEAR ['12'])

SELECT Statement Using the Calculated Measure

Query the analytic view, selecting hierarchy member captions, sales values, and sales for the year 2012..

SELECT TIME_ATTR_DIM.TIME_HIER.member_caption AS "TIME",
       PRODUCT_ATTR_DIM.PRODUCT_HIER.member_caption AS "PRODUCT",
       ROUND(SALES,2) AS "SALES" ,
       SALES_2012 AS "SALES_2012"
FROM SALES_AV HIERARCHIES(TIME_ATTR_DIM.TIME_HIER, PRODUCT_ATTR_DIM.PRODUCT_HIER)
WHERE (TIME_ATTR_DIM.TIME_HIER.level_name IN ('YEAR')) AND
      (PRODUCT_ATTR_DIM.PRODUCT_HIER.level_name IN ('DEPARTMENT'))
ORDER BY  
      TIME_ATTR_DIM.TIME_HIER.hier_order,
      PRODUCT_ATTR_DIM.PRODUCT_HIER.hier_order;

Results of the Query

TIME    PRODUCT                   SALES         SALES_2012
------  ------------------------  ------------  -------------
CY2011  Cameras and Camcorders    441999885.45   451487775.73
CY2011  Computers                6197250430.29  6331603800.78
CY2011  Portable Music and Video  115865664.99   118590822.44
CY2012  Cameras and Camcorders    451487775.73   451487775.73
CY2012  Computers                6331603800.78  6331603800.78
CY2012  Portable Music and Video  118590822.44   118590822.44
CY2013  Cameras and Camcorders    472866559.56   451487775.73
CY2013  Computers                6643616381.85  6331603800.78
CY2013  Portable Music and Video  124455776.16   118590822.44
CY2014  Cameras and Camcorders    496952312.98   451487775.73
CY2014  Computers                6952712285.9   6331603800.78
CY2014  Portable Music and Video  130081754.01   118590822.44
CY2015  Cameras and Camcorders    518161607.77   451487775.73
CY2015  Computers                7287019745.47  6331603800.78
CY2015  Portable Music and Video  135921531.91   118590822.44