OBIEE: BY clause for group by

Within Oracle BI Answers (and only within BI Answers; not within the rpd metadata model), the BY clause can be used in conjunction with a Aggregate function to specify the level at which the metric should be aggregated (group by).

As an Example, the following Analysis displays the shipped amount per Year and product type:

image

Within certain scenarios, it may be useful to add a level of aggregation at a particular level within a Report. This can be achieved with the BY clause. This clause can be added with a aggregation function such as MIN, MAX, SUM etc. within the BI Answers formula editor:

image

SUM("Base Facts"."7- Shipped Amount" BY "Time"."T05 Per Name Year")

This, creates a group by for the measure at the level of year, regardless of other aggregation levels intended by the Report e.g. at the level of year and produt type:

image

However, this clause should only be used with caution for possible incorrect or unintended results.

Within the .rpd, the concept of Level-Based Measures can be used to achieve the same Results.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.