Example of Exception Aggregation: Count
The following scenario shows how you can count the results of a calculated key figure in the BEx Query Designer.
You have loaded the following data into your InfoCube:
|
Region |
Customer |
Sales |
|---|---|---|
|
USD |
||
|
NY |
A |
400,000 |
|
B |
200,000 |
|
|
C |
50,000 |
|
|
CA |
A |
800,000 |
|
C |
300,000 |
In the query you want to determine the number of customers where the revenue is under 1,000,000 USD. For this you need to create the calculated key figure Revenue Customer <= 1,000,000 (F1) with the following properties:
-
Tab page General: Formula Definition: Revenue <= 1,000,000
-
Aggregation tab page: Exception Aggregation: Total, Ref. Characteristic: Customer
This query would deliver the following result:
|
Region |
Customer |
Sales |
F1 |
|---|---|---|---|
|
USD |
|||
|
NY |
A |
400,000 |
1 |
|
B |
200,000 |
1 |
|
|
C |
50,000 |
1 |
|
|
Result |
650,000 |
3 |
|
|
CA |
A |
800,000 |
1 |
|
C |
300,000 |
1 |
|
|
Result |
1,100,000 |
2 |
|
|
Overall Result |
1,750,000 |
2 |
|
A query with the breakdown according to region would give the following result:
|
Region |
Sales |
F1 |
|---|---|---|
|
USD |
||
|
NY |
650,000 |
3 |
|
CA |
1,100,000 |
2 |
|
Overall Result |
1,750,000 |
2 |