Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
vinay_lohakare5
Contributor

Senario:

The BEx query had the Percentage Function - >%GT (SUMGT) used in one of the key figure. % GT (SUMGT)function gives the Percentage Share of overall result. The overall result means the result of aggregation at the next level in the list.

If a BEx query is using DATA functions it cannot be enabled for the External access, and cannot be used as a data source for BO Reporting. Thus we need to remove these Data functions from the query and need to implement at BO WEBI report level. Below solution shows how the %GT function can be achieved in WEBi.

Solution:

Example Data:

Below report shows the number of employee hired by year and quarter. In BEx query we can get the percentage share of overall result using the %GT function.

YearQuarterNumber of Employee Hired
2010Q1600
2010Q2500
2010Q3400
2010Q4300
2011Q1300
2011Q2400
2011Q3500
2011Q4600

Same can be implemented in WEBi using the already available functions.

Percentage Function:

We can use the Percentage function for calculating the percentages. The function calculates the percentage of a number in relation to its surrounding context. We can use the formula Percentage ([Number of Employee Hired]) and get the below result.

YearQuarterNumber of Employee HiredPercentage
2010Q16000.17
2010Q25000.14
2010Q34000.11
2010Q43000.08
2011Q13000.08
2011Q24000.11
2011Q35000.14
2011Q46000.17

The function calculates the Number of Employee hired as a percentage of the number of employee hired. The function will work even if the report is split into sections by year. In this case the surrounding context outside the table becomes the total employee hired as seen below.

YearQuarterNumber of Employee HiredPercentage
2010Q16000.33
2010Q25000.28
2010Q34000.22
2010Q43000.17

Sum Function:

We can also make use of the Sum function along with the extended syntax keywords Report and Section to calculate the overall total employee hired and the yearly employee hired respectively.

Column "Percentage of Total" has below formula:

[ Number of Employee Hired ]/ ( SUM ( [ Number of Employee Hired ] In Report ))

Column "Percentage of Year" has below formula:

[ Number of Employee Hired ]/ ( SUM ( [ Number of Employee Hired ] In Section ))

YearQuarterNumber of Employee Hired% of Total% of Year
2010Q16000.170.33
2010Q25000.140.28
2010Q34000.110.22
2010Q43000.080.17
Labels in this area