Skip to Content

Sum Result showing in-correct for some Dimension Values

We are on
SAP BusinessObjects BI Platform 4.1 Support Pack 5 Patch 7
Version: 14.1.5.1726

I have query from database which is as below
select legacy_code,..,
SUM(CASE WHEN amt>=0 THEN amt ELSE 0 END) as DEBIT_AMT,
SUM(CASE WHEN amt<0 THEN amt ELSE 0 END) as CREDIT_AMT,
(SUM(CASE WHEN amt<0 THEN amt ELSE 0 END)+SUM(CASE WHEN amt>=0 THEN amt ELSE 0 END)) as DBT_CRT_DIFF
...

I've pullied all the required objects from universe to my report but unable to build above logic in report
using below 2 vairables created in Webi report

(1) CR_AMT =0+Sum(If([Gross Amount]<0;[Gross Amount];0)) Where ([Debit Credit]="C")
(2) CR_AMT =0+Sum([Gross Amount]) Where ([Debit Credit]="C")

But on both the occassions result set does not match for few leagcy code dimension which are selected along with the measure.

Is there a way to achive this in Webi report

In the attachment, I've highlighted the codes where amounts differ Refer BO_Output

Also attached is database query output

bo-output.png (24.5 kB)
database.png (62.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers