0% found this document useful (0 votes)
760 views6 pages

Calculating Proper SUMCT For Calculated Key Figures

Manual

Uploaded by

Carlos Galvez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
760 views6 pages

Calculating Proper SUMCT For Calculated Key Figures

Manual

Uploaded by

Carlos Galvez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Calculating Proper SUMCT for

Calculated Key Figures

Applies to:
This applies to SAP BI 7.0. For more information, visit the Business Intelligence homepage

Summary
The result for Calculated Key Figures is also calculated based on the formula used. Hence usage of SUMCT
function yields improper values (not the summation of individual values). This document illustrates steps to
get correct SUMCT for such Calculated Key Figures (CKF)
Author:

Shashank Dighe

Company: Patni Computers Ltd.


Created on: 19 February 2009

Author Bio
Shashank Dighe is a SAP BI Consultant having 2 years of experience on SAP BI. He has
worked on many end to end to projects in SAP BI for multiple clients. You can reach him at
[email protected] or [email protected]

SAP COMMUNITY NETWORK


2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


1

Calculating Proper SUMCT for Calculated Key Figures

Table of Contents
Summary.............................................................................................................................................................3
Step By Step Solution with Example ..................................................................................................................3
Query Creation:...............................................................................................................................................3
Formulae Used for Calculated KF:..................................................................................................................3
Output of the Query:........................................................................................................................................4
Create new CKF with Exception Aggregation:................................................................................................4
Output of the Query (With Exception Aggregation CKF): ...............................................................................4
Related Content ..............................................................................................................................................5
Disclaimer and Liability Notice............................................................................................................................6

SAP COMMUNITY NETWORK


2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


2

Calculating Proper SUMCT for Calculated Key Figures

Summary
Many a times there is a need to use the SUM of a Key Figure in the calculation of other Key Figures at the
Reporting Level. This SUM for a Key Figure can be achieved with the standard formula in Query Designer
called SUMCT. The SUMCT works perfectly fine for the calculation of the SUM for the basic Key Figures
but for a Calculated Key Figure sometimes it does not yield the required result.
This happens because the result for the Calculated Key Figure is also calculated based on the formula used
and hence when SUMCT is used on such a Key Figure the result is not the sum of each value of Calculated
Key Figure. This can be overcome with the help of Exception Aggregation Concept.
Note: The Property Calculate Result as Total is only for display purpose and SUMCT function fetches the actual
calculated value and not the display value.

Step By Step Solution with Example


Query Creation:
Consider the following query definition built on a basic cube. Here the characteristics are Customer, Country
& Region. The Key Figures are: Amount (Basic KF), Quantity (Basic KF), Total Amount (CKF) and Formula 1
(CKF).

Formulae Used for Calculated KF:

SAP COMMUNITY NETWORK


2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


3

Calculating Proper SUMCT for Calculated Key Figures

Output of the Query:


From the below query result set, it can be observed that the result for Total Amount KF is also calculated on
the basis of the formula used and hence it does not yield the summation of the individual values. So for KF
Formula 1 (SUMCT Total Amount), though expected value for Customer 1 is $ 50, it populates the value as
$ 90.

Create new CKF with Exception Aggregation:


To get the correct values for SUMCT function, create a new CKF Total Amount with same formula but its
Aggregation properties should be set as Total for Exception Aggregation and Reference Character as the
last character in the rows of the query definition. For the example, the last character is Region and hence
Exception Aggregation is set at Region.

Output of the Query (With Exception Aggregation CKF):


As seen from the query result set below, Formula 2 CKF which has formula SUMCT Total Amount (With
Excp Agg) fetches the proper SUMCT for the CKF with exception aggregation set

SAP COMMUNITY NETWORK


2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


4

Calculating Proper SUMCT for Calculated Key Figures

Related Content
Exception Aggregation
SUMCT Function for CKF
SUMCT Problem
For more information, visit the Business Intelligence homepage

SAP COMMUNITY NETWORK


2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


5

Calculating Proper SUMCT for Calculated Key Figures

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK


2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


6

You might also like