unit 3 calculated and restricted key figures

16
BEx Query Designer Unit 3: Calculated and Restricted Key Figures 7/17/2007

Upload: hqingjin

Post on 11-Apr-2015

109 views

Category:

Documents


0 download

DESCRIPTION

sap bw Unit 3 Calculated and Restricted KEy Figures

TRANSCRIPT

Page 1: Unit 3 Calculated and Restricted KEy Figures

BEx Query DesignerBEx Query Designer

Unit 3: Calculated and Restricted Key Figures

7/17/2007

Page 2: Unit 3 Calculated and Restricted KEy Figures

Slide 2

What is a Restricted Key Figure?What is a Restricted Key Figure?

Restricted key figures are (basic) key figures of the InfoProvider that are restricted (filtered) by one or more characteristic selections.

Filter vs. Restricted Key Figure?Filter

– restrictions are valid for the entire queryRestricted Key Figure

– only the key figure in question is restricted to its allocated characteristic value or characteristic value interval

Examples:– Last Month’s Sales Amounts– Tons Shipped to Customer ABC

Page 3: Unit 3 Calculated and Restricted KEy Figures

Slide 3

Defining Restricted Key FiguresDefining Restricted Key Figures

When defining a restricted key figure, you want to select the restricting characteristics, individual characteristic values, value ranges, hierarchy nodes, or characteristic variables.

You can include values in the selection or exclude values from the selection by selecting these options in the context menu of the relevant filter value.

When selecting value ranges, the following operations are available:

• Between• Greater than or equal to• Less than or equal to• Greater than• Less than

Page 4: Unit 3 Calculated and Restricted KEy Figures

Slide 4

Formulating Selection ConditionsFormulating Selection Conditions

The characteristic values available in the Fixed Values window are restricted to 100 values by default. Click Display Other Values to modify this restriction.

Choose the attribute, operator, andcharacteristic value to formulate a newselection condition.

Example:– Display all products with the text toothpaste in the name

If you set the Number of values displayed to All, and there are a large number of characteristic values, this may cause a long wait when

selecting values. Heads Up!

Page 5: Unit 3 Calculated and Restricted KEy Figures

Slide 5

What is a Calculated Key Figure?What is a Calculated Key Figure?

You can use a formula to calculate key figures that are not in the InfoProvider by using basic key figures, restricted key figures, and existing calculated key figures in the formula definition.

Percentage Functions– Percentage Variance (%) – Percentage Share (%S) – Percentage Share of Result (%CT) – Percentage Share of Overall Result (%GT)

Data Functions– Count [COUNT(<Expression>)]– Division by Zero [NDIV(<Expression>)]– Result [SUMCT <Operand>]– Overall Result [SUMGT <Operand>]– Report Result [SUMRT <Operand>]

Mathematical Functions– Maximum– Minimum– Absolute Value– Smallest integer value larger than operand– Division (integers)

Page 6: Unit 3 Calculated and Restricted KEy Figures

Slide 6

Defining Calculated Key FiguresDefining Calculated Key Figures

You can use all basic key figures of the InfoProvider in question, as well as the newly defined restricted and calculated key figures of the InfoProvider, to define new calculated key figures.

You can use the following boolean operators to create conditional calculations (IF-THEN-ELSE):

• Relational Operators (<, <=, <>, ==, >, >=)

• Logical AND (AND)• Logical OR (OR)• Logical Exclusive OR (XOR)• Logical NOT (NOT)• NOT <Expression>• LEAF

Note

The relational operators return a value of 1 if the expression is true, otherwise 0.

Page 7: Unit 3 Calculated and Restricted KEy Figures

Slide 7

Relational OperatorsRelational Operators

You can use boolean operators to implement the formula given below:

• IF Actual Cost > Plan Cost THEN Actual Cost ELSE Plan Cost

Use the boolean operator > to perform the comparison between the key figures.

The result is 1 if ( Actual Cost > Plan Cost ), otherwise 0.

The operator NOT returns 1 if <Expression> is 0, otherwise 0.

Actual Cost > Plan Cost(1 * Actual Cost) + (NOT (1) * Plan Cost) = Actual Cost

Actual Cost < Plan Cost(0 * Actual Cost) + (NOT (0) * Plan Cost) = Plan Cost

Page 8: Unit 3 Calculated and Restricted KEy Figures

Slide 8

Boolean Operators - LEAFBoolean Operators - LEAF

The boolean operator LEAF can be used for carrying out different calculations on results rows and elementary rows of a key figure.

For example, this can be used for weightedaverage calculations for results rows:

• Key figure Tons can be calculated as Tons in the elementary rows andas Tons/Load in the results rows

The first part LEAF of the expression returns 1 for elementary rows and 0 for results rows.

The second part NOT LEAF of the expression returns 0 for elementary rows and 1 for results rows.

Note

The LEAF operator returns a value of 0 for results rows and 1 for elementary rows.

Page 9: Unit 3 Calculated and Restricted KEy Figures

Slide 9

Properties of Key FiguresProperties of Key Figures

You can assign a unique technical name to structure parts such as key figures (optional).

You can change the automatically determined key figure description here.

You can choose whether the key figure is to be highlighted in the report here.

You can hide key figures that you only need for calculating formulas, and do not want to display in the analysis.

Page 10: Unit 3 Calculated and Restricted KEy Figures

Slide 10

Properties of Key FiguresProperties of Key Figures

The scaling factor is not automatically displayed in the report. You have to set the scaling factor display separately in the query properties.

The reverse +/- signs is only a display function. It has no influence on calculation in formulas.

You can use this function to recalculate result rows and individual values that are displayed in the version according to particular criteria.

You can use the Cumulated function to ensure that the cells of a column are presented from top to bottom, and the cells of a row are displayed from left to right.

Page 11: Unit 3 Calculated and Restricted KEy Figures

Slide 11

Properties of Key FiguresProperties of Key Figures

In the Properties of the Calculated Key Figure dialog box, you can also select an exception aggregation for a special characteristic for the calculated key figure.

You can set a currency conversion key and a target currency in the properties dialog box for a key figure.

Page 12: Unit 3 Calculated and Restricted KEy Figures

Slide 12

Formula CollisionFormula Collision

The Formula Collision function is only displayed in the properties dialog box if two structures are used in the query definition and both contain formulas.

In places where the two formulas collide, it is not clear how the system should calculate. You can therefore choose the formula from which you want the value to be calculated.

Page 13: Unit 3 Calculated and Restricted KEy Figures

Slide 13

StructuresStructures

Structures are combinations of characteristics and key figures of the InfoProvider.

A structure can be used in a planned/actual comparison or in a contribution margin scheme.

Structures can be used to calculate MTD, QTD, YTD, etc. figures.

Page 14: Unit 3 Calculated and Restricted KEy Figures

Slide 14

Cell EditorCell Editor

Cell Editor allows direct definition of specific cells in a query.

Cells are the intersection of two structures in a query definition.

The Cell Editor can only be used in query definitions where there are two structures.

Cells can be formulas, selections, references or auxiliary cells.

Note

One structure will hold only characteristics while the other structure holds only key figures.

Page 15: Unit 3 Calculated and Restricted KEy Figures

Slide 15

Cell EditorCell Editor

You can use the cell editor to calculate the x- month rolling average for a key figure.

1. Select the cell you want for calculation as a new reference.

2. Right-click and select New Formula (or New Selection).

3. Use the reference cell for doing the Average calculation. The original value will now be replaced with the cell editor calculation.

Page 16: Unit 3 Calculated and Restricted KEy Figures

Slide 16

Tabular ReportingTabular Reporting

Tabular Reporting will let you arrange the characteristics and key figures in any order when you create a query.

– For example, you can insert a characteristic column between 2 key figure columns.

Use the Table Display icon for changing to tabular mode.

To re-arrange the characteristics and key figures, use BEx drag and drop features.

Navigation functions like Swapping, drilldown, etc. are not supported with Tabular Reporting.

Heads Up!