Bex Query Designer Calculated And Restricted Key Figures |


Published on

Download this slide from

Want to get more SAP Documents ? Visit

1 Comment
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Bex Query Designer Calculated And Restricted Key Figures |

  1. 1. BEx Query Designer Unit 3: Calculated and Restricted Key Figures 7/17/2007
  2. 2. What is a Restricted Key Figure? <ul><li>Restricted key figures are (basic) key figures of the InfoProvider that are restricted (filtered) by one or more characteristic selections. </li></ul><ul><li>Filter vs. Restricted Key Figure? </li></ul><ul><li>Filter </li></ul><ul><ul><li>restrictions are valid for the entire query </li></ul></ul><ul><li>Restricted Key Figure </li></ul><ul><ul><li>only the key figure in question is restricted to its allocated characteristic value or characteristic value interval </li></ul></ul><ul><li>Examples: </li></ul><ul><ul><li>Last Month’s Sales Amounts </li></ul></ul><ul><ul><li>Tons Shipped to Customer ABC </li></ul></ul>
  3. 3. Defining Restricted Key Figures <ul><li>When defining a restricted key figure, you want to select the restricting characteristics , individual characteristic values , value ranges , hierarchy nodes , or characteristic variables . </li></ul><ul><li>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. </li></ul><ul><li>When selecting value ranges, the following operations are available: </li></ul><ul><ul><li>Between </li></ul></ul><ul><ul><li>Greater than or equal to </li></ul></ul><ul><ul><li>Less than or equal to </li></ul></ul><ul><ul><li>Greater than </li></ul></ul><ul><ul><li>Less than </li></ul></ul>
  4. 4. Formulating Selection Conditions <ul><li>The characteristic values available in the Fixed Values window are restricted to 100 values by default. Click Display Other Values to modify this restriction. </li></ul><ul><li>Choose the attribute, operator, and characteristic value to formulate a new selection condition. </li></ul><ul><li>Example: </li></ul><ul><ul><li>Display all products with the text toothpaste in the name </li></ul></ul><ul><ul><li>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. </li></ul></ul>Heads Up!
  5. 5. What is a Calculated Key Figure? <ul><li>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. </li></ul><ul><li>Percentage Functions </li></ul><ul><ul><li>Percentage Variance ( % ) </li></ul></ul><ul><ul><li>Percentage Share ( %S ) </li></ul></ul><ul><ul><li>Percentage Share of Result ( %CT ) </li></ul></ul><ul><ul><li>Percentage Share of Overall Result ( %GT ) </li></ul></ul><ul><li>Data Functions </li></ul><ul><ul><li>Count [ COUNT(<Expression>) ] </li></ul></ul><ul><ul><li>Division by Zero [ NDIV(<Expression>) ] </li></ul></ul><ul><ul><li>Result [ SUMCT <Operand> ] </li></ul></ul><ul><ul><li>Overall Result [ SUMGT <Operand> ] </li></ul></ul><ul><ul><li>Report Result [ SUMRT <Operand> ] </li></ul></ul><ul><li>Mathematical Functions </li></ul><ul><ul><li>Maximum </li></ul></ul><ul><ul><li>Minimum </li></ul></ul><ul><ul><li>Absolute Value </li></ul></ul><ul><ul><li>Smallest integer value larger than operand </li></ul></ul><ul><ul><li>Division (integers) </li></ul></ul>
  6. 6. Defining Calculated Key Figures <ul><li>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. </li></ul><ul><li>You can use the following boolean operators to create conditional calculations (IF-THEN-ELSE): </li></ul><ul><ul><li>Relational Operators (<, <=, <>, ==, >, >=) </li></ul></ul><ul><ul><li>Logical AND (AND) </li></ul></ul><ul><ul><li>Logical OR (OR) </li></ul></ul><ul><ul><li>Logical Exclusive OR (XOR) </li></ul></ul><ul><ul><li>Logical NOT (NOT) </li></ul></ul><ul><ul><li>NOT <Expression> </li></ul></ul><ul><ul><li>LEAF </li></ul></ul>The relational operators return a value of 1 if the expression is true, otherwise 0. Note
  7. 7. Relational Operators <ul><li>You can use boolean operators to implement the formula given below: </li></ul><ul><ul><li>IF Actual Cost > Plan Cost THEN Actual Cost ELSE Plan Cost </li></ul></ul><ul><li>Use the boolean operator > to perform the comparison between the key figures. </li></ul><ul><li>The result is 1 if ( Actual Cost > Plan Cost ), otherwise 0 . </li></ul><ul><li>The operator NOT returns 1 if <Expression> is 0 , otherwise 0 . </li></ul><ul><li>Actual Cost > Plan Cost </li></ul><ul><li>(1 * Actual Cost) + (NOT (1) * Plan Cost) = Actual Cost </li></ul><ul><li>Actual Cost < Plan Cost </li></ul><ul><li>(0 * Actual Cost) + (NOT (0) * Plan Cost) = Plan Cost </li></ul>
  8. 8. Boolean Operators - LEAF <ul><li>The boolean operator LEAF can be used for carrying out different calculations on results rows and elementary rows of a key figure. </li></ul><ul><li>For example, this can be used for weighted average calculations for results rows: </li></ul><ul><ul><li>Key figure Tons can be calculated as Tons in the elementary rows and as Tons/Load in the results rows </li></ul></ul><ul><li>The first part LEAF of the expression returns 1 for elementary rows and 0 for results rows. </li></ul><ul><li>The second part NOT LEAF of the expression returns 0 for elementary rows and 1 for results rows. </li></ul>The LEAF operator returns a value of 0 for results rows and 1 for elementary rows. Note
  9. 9. Properties 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.
  10. 10. Properties 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.
  11. 11. Properties 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.
  12. 12. Formula 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.
  13. 13. Structures <ul><li>Structures are combinations of characteristics and key figures of the InfoProvider. </li></ul><ul><li>A structure can be used in a planned/actual comparison or in a contribution margin scheme. </li></ul><ul><li>Structures can be used to calculate MTD , QTD , YTD , etc. figures. </li></ul>
  14. 14. Cell Editor <ul><li>Cell Editor allows direct definition of specific cells in a query. </li></ul><ul><li>Cells are the intersection of two structures in a query definition. </li></ul><ul><li>The Cell Editor can only be used in query definitions where there are two structures. </li></ul><ul><li>Cells can be formulas, selections, references or auxiliary cells. </li></ul>One structure will hold only characteristics while the other structure holds only key figures. Note
  15. 15. Cell Editor <ul><li>You can use the cell editor to calculate the x- month rolling average for a key figure. </li></ul><ul><ul><li>Select the cell you want for calculation as a new reference. </li></ul></ul><ul><ul><li>Right-click and select New Formula (or New Selection ). </li></ul></ul><ul><ul><li>Use the reference cell for doing the Average calculation. The original value will now be replaced with the cell editor calculation. </li></ul></ul>
  16. 16. Tabular Reporting <ul><li>Tabular Reporting will let you arrange the characteristics and key figures in any order when you create a query. </li></ul><ul><ul><li>For example, you can insert a characteristic column between 2 key figure columns. </li></ul></ul><ul><li>Use the Table Display icon for changing to tabular mode. </li></ul><ul><li>To re-arrange the characteristics and key figures, use BEx drag and drop features. </li></ul><ul><ul><li>Navigation functions like Swapping, drilldown, etc. are not supported with Tabular Reporting. </li></ul></ul>Heads Up!