Skip to Content

How to use Percentage Functions in Bex Query Designer

Percentage functions in BEx query designer are used to calculate different types of percentages as per the business requirement of the report. These functions are used in calculated key figures/formulas of the query to calculate and display various percentage values with the symbol ‘%’ as a suffix.


Here is a business scenario of a BEx report in which all percentage functions available in BEx are used to achieve the desired result ->

Screenshot of the Report in BEx Analyzer (Fig: 1) ->

/wp-content/uploads/2013/12/scnp_1_340893.jpgScreenshot of the corresponding query in BEx Query Designer (Fig: 2) ->    

/wp-content/uploads/2013/12/scnp_2_340911.jpgThe above report deals with the sales of different stores in different countries during april and may months.Hence ‘Country’ , ‘Store Name’ characteristics are used as rows and KF selections ‘April Sales’, ‘May Sales’ are used as columns in the report. Formula ‘Total Sales’ is nothing but the sum of ‘April Sales’, ‘May Sales’.

1.     Using ‘Percentage Variance (%)’ function:

/wp-content/uploads/2013/12/scnp_3_340912.jpg

Calculation behind this formula:


‘April Sales’ % ‘May Sales’ = 100 (April Sales – May Sales) / abs (May Sales), when denominator not equals zero.If denominator equals zero, then based on your BEx global settings, it displays the character you set for ‘division by 0’operations.For example: #, X, blank space, 0 etc.


In (Fig: 1) -> % variance between ‘April Sales’, ‘May Sales’ is calculated as highlighted below:

/wp-content/uploads/2013/12/scnp_4_340925.jpg

2.     Using ‘Percentage Share (%A)’ function:

/wp-content/uploads/2013/12/scnp_5_340926.jpg

Calculation behind this formula:


‘April Sales’ %A ‘Total Sales’ = 100 (April Sales) / abs (Total Sales), when denominator not equals zero. If denominator equals zero, then based on your BEx global settings, it displays the character you set for ‘division by 0’operations.For example: #, X, blank space, 0 etc.


In (Fig: 1) -> % share of ‘April Sales’ in ‘Total Sales’ is calculated as highlighted below:

/wp-content/uploads/2013/12/scnp_6_340927.jpg

3.     Using ‘Percentage Share of Result (%CT)’ function:

/wp-content/uploads/2013/12/scnp_7_340958.jpg

Calculation behind this formula:


%CT ‘Total Sales’ means -> Percentage share of ‘Total Sales’ values in ‘Result’ values of the Report.


From (Fig: 1) -> % share of ‘Total Sales’ values in ‘Result’ values of the Report are calculated as highlighted below:

/wp-content/uploads/2013/12/scnp_8_340980.jpg

4.     Using ‘Percentage Share of Overall Result (%GT)’ function:

/wp-content/uploads/2013/12/scnp_9_340960.jpg

Calculation behind this formula:


%GT ‘Total Sales’ means -> Percentage share of ‘Total Sales’ values in ‘Overall Result’ values of the Report.


From (Fig: 1) -> % share of ‘Total Sales’ values in ‘Overall Result’ values of the Report are calculated as highlighted below:

Fig: 3 ->

/wp-content/uploads/2013/12/scnp_10_340964.jpg

5.     Using ‘Percentage Share of Query Result (%RT)’ function:

/wp-content/uploads/2013/12/scnp_11_340965.jpg

Calculation behind this formula:


There is no difference between functionality of %GT, %RT functions when the report does not have any dynamic filter applied (as shown in Fig: 3 above).


But when a dynamic filter is applied, ‘Overall Result’ values in the report are changed in accordance with the filter value. Hence %GT function calculates % share values by considering changed ‘Overall Result’ values.

Here comes the importance of %RT function, this percentage function will always calculate % share values with respect to the ‘Query Result’ (i.e., ‘Overall Result’  before the filter was applied),which means %RT function works irrespective of the dynamic filter and the query navigational state.

When a dynamic filter is applied on the report, the difference in functionality of the %GT, %RT functions can be observed in the Fig: 4 below.

Note: dynamic filter is applied on the ‘Country’ column with value ‘BR Brazil’.

Fig: 4 ->

/wp-content/uploads/2013/12/scnp_12_340979.jpg

18 Comments
Comments are closed.
Comments are closed.