Technical data

Chapter 11 Using Built-in Functions in Analytic M odels
Example
Suppose that yo
u want to maximize sales information by product. Create an analytic model definition that
contains the f
ollowing dimensions:
1. TRANSACTIONS, which contains a series of sales transactions.
2. PRODUCTS, which contains a dimension of products.
Define the following data cubes:
1. SALE_AMOUNT,
which uses the TRANSACTIONS dimension. This data cube contains the amount
of each sale.
2. An associatio
ndatacubecalledPRODUCT_SOLD, which associates TRANSACTIONS with
PRODUCTS.
See C
hapter 5, “Creating Data Cubes,” C reatin g Association Data Cubes, page 39.
3. MAXIMUM_SALES_BY_PRODUCT, which uses the PRODUCTS dimension.
Calculate this data cube with the following formula:
GROUPMAX(TRANSACTIONS, SALE_AMOUNT, PRODUCT_SOLD)
You can read this formula as follows: Find the maximum transactions’ sale amounts by product.
To calculate g
roup maximums of all members that meet a condition, use an IF function as the expression,
with #N/A as th
e third argument. For example, use IF(VALID, SALE_AMOUNT, #N/A) instead of
SALE_AMOUNT i
n the formula above.
GROUPMIN
Syntax
GROUPMIN(Di
mensiontoGroup, Expression, Association 1, {Association 2 ...})
Description
Use the GROUPMIN function to minimize information by group. Expression contains the data to minimize.
The Association(s) indicate for which group(s) to minimize.
Example
Suppose that you want to minimize sales information by product. Create an analytic model definition that
contains the following dimensions:
1. TRANSACTION
S, which contains a series of sales transactions.
2. PRODUCTS, wh
ich contains a series of products.
Define the following data cubes:
1. SALE_AMOUNT, which uses the TRANSACTIONS dimension.
This data cube contains the amount of each sale.
2. An association data cube called PRODUCT_SOLD, which associates TRANSACTIONS with
PRODUCTS.
See C
hapter 5
, “Creating Data Cubes,” Creating Association Data Cubes, page 39.
Copyright © 1988-2007, Oracl e. All rights reserved. 161