### SAP BOBJ Web Intelligence Formulas Functions & Calculations

To calculate the percentage of one measure compared to another measure, you need to build a custom calculation. Applies the default aggregation function to a standard measure, or the database aggregation function to a smart measure. When you apply a standard calculation to a table column, the calculation result appears in a footer in the column.

Web Intelligence adds a footer for the result of each calculation if you apply multiple calculations to the same column. Using formulas to build custom calculations Custom calculations allow you to add additional calculations to your report beyond its base objects and the standard calculations provided by Web Intelligence. You add a custom calculation by writing a formula that Web Intelligence evaluates when you run the report. A formula can consist of base report variables, functions, operators and calculation contexts.

A custom calculation is a formula that can consist of report objects, functions and operators. Formulas have a calculation context that you can specify explicitly if you choose. For more information, see What are calculation contexts? Using Functions, Formulas and Calculations in Web Intelligence 11 2 2 Using standard and custom calculations Using standard and custom calculations in your reports Example: Showing average revenue per sale If you have a report with Sales Revenue and Number Sold objects and you want to add revenue per sale to the report.

Using variables to simplify formulas If a formula is complex you can use variables to simplify it. By using variables you break a complex formula down into manageable parts and make it much easier to read, as well as making building formulas much less error-prone. You can use previously-created variables in a formula in exactly the same way as you use other report objects. You can type this variable name into a formula or drag the variable to the Formula toolbar as you would for any report object.

### News & information about SAP Business Intelligence tools and SAP HANA

Example: Create a formula to return a statistical variance Variance is a statistical term. The variance of a set of values measures the spread of those values around their average. Web Intelligence has the function Var that calculates the variance in one step, but manual calculation of variance provides a good example of how to simplify a complex formula using variables. This simplified version of the formula gives you a high-level view of what the formula is doing, rather than plunging you into the confusing details.

You can then examine the formulas of the variables referenced in the high-level formula to understand its component parts. For example, the formula references the variable Difference Squared, which itself references the variable Average Sold. By examining the formulas of Difference Squared and Average sold, you can drill down into the formula to understand the details of what it is doing.

Calculations can also include functions in addition to report objects. A function receives zero or more values as input and returns output based on those values. For example, the Sum function totals all the values in a measure and outputs the result.

• Where Are the Children?.
• Average function eliminates repeated values?
• How to calculate it, best practice? Formula's put upside down in Busin.
• Panzerwaffe at War: v. 1 (Armor at War 7000)!
• Insights from our experts.
• Stable Internal Fixation in Maxillofacial Bone Surgery: A Manual for Operating Room Personnel.

The formula Sum [Sales Revenue] outputs a total of sales revenues. In this case, the function input is the Sales Revenue measure and the output is the total of all Sales Measures.

Literal text appears in quotation marks, while formulas appear without quotation marks. Function prototypes To use a function you need to know its name, how many input values it requires and the data types of these input values.

### Tools and Software

You also need to know the type of data that the function outputs. For example, the Sum function takes a numerical object as input for example a measure showing sales revenue and outputs numeric data the sum of all the values of the measure object. The Formula Editor displays the function prototype when you select the function. The State object also appears in the report data, although it is not displayed.

When the user runs the report they are presented with a prompt and they must choose a state. You want to show the state that they have chosen in the report title. This function calculates the percentage of a number in relation to its surrounding context. For example, the following table shows revenues by year and quarter. The percentage column contains the formula Percentage [Sales Revenue]. Using Functions, Formulas and Calculations in Web Intelligence 15 2 2 Using standard and custom calculations Using standard and custom calculations in your reports In this case the function calculates each revenue as a percentage of the total revenue.

The surrounding context is the total revenue; this is the only revenue figure that is relevant outside the breakdown by year and quarter in the table. If the report is split into sections by year, the surrounding context outside the table becomes the total revenue in the section.

https://werslilnusctingsand.cf

## SAP BusinessObjects Webi | Web Intelligence | SAP HANA

If the Percentage cell is placed outside the table but still inside the section, the surrounding context becomes the total revenue. In this case the Percentage function calculates the total revenue for the section as a percentage of the total overall revenue.

Create a formula to calculate a value: SAP BusinessObjects Web Intelligence 4.0

For more information, see Modifying the default calculation context with extended syntax on page Simplifying a variance formula with variables Variance is a statistical term. Creating the variance formula There are several steps involved in creating a variance formula. You encapsulate each of these steps in a variable. Web Intelligence function and formula operators Operators link the various components in a formula. Formulas can contain mathematical, conditional, logical, function-specific or extended syntax operators. Mathematical operators Mathematical operators are familiar from everyday arithmetic.

The formula [Sales Using Functions, Formulas and Calculations in Web Intelligence 19 2 2 Using standard and custom calculations Using standard and custom calculations in your reports Revenue] - [Cost of Sales]contains a mathematical operator, in this case subtraction. That is, it joins character strings. Conditional operators Conditional operators determine the type of comparison to be made between values.

## Removing the Confusion from Calculation Contexts

Logical operators Logical operators are used in expressions that return True or False. You use such expressions in the If function. Context operators Context operators form part of extended calculation syntax. Extended syntax allows you to define which dimensions a measure or formula takes into account in a calculation. Function-specific operators Some Web Intelligence functions can take specific operators as arguments. Using Functions, Formulas and Calculations in Web Intelligence 21 2 2 Using standard and custom calculations Using standard and custom calculations in your reports 22 Using Functions, Formulas and Calculations in Web Intelligence Understanding calculation contexts 3 3 Understanding calculation contexts What are calculation contexts?

1. Algorithms in Java, Part 5: Graph Algorithms.
2. SAP BI SP4: What’s New in Web Intelligence and Semantic Layer - SAPSPOT.
3. Removing the Confusion from Calculation Contexts.
4. How to Enter a Formula?!