COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: rrutkowski on 16 Dec 2016 08:24:05 AM

Title: can't get a weighted average to work in cognos 11
Post by: rrutkowski on 16 Dec 2016 08:24:05 AM
I have a report that requires summary lines by branch
the weighted average calculation is:
1. ([Account Instrument Current Int Rate]*[Note Ledger Balance]) as Account WAR
2. final calculation on report is:  [Account WAR] /  [Note Ledger Balance]

I get zeros.  I have set both calculations as calculated for detail and summary aggregation.  i have the interest rate field set to none for detail and summary aggegation. 

If i include the interest rate value on the report, I get a weighted average but not a summary weighted average. 

Branch   # of Accts   Account Instrument Current Int Rate   Note Ledger Balance   Wtd Avg
CARTERSVILLE   1   0.345   $50,000.00   0.35
CARTERSVILLE   8   1.294   $605,639.02   1.29
CARTERSVILLE   3   1.29   $50,641.92   1.29
CARTERSVILLE   1   0.992   $37,000.00   0.99
CARTERSVILLE   1   1.095   $50,000.00   1.10
CARTERSVILLE   25   0   $59,307.02   0.00
CARTERSVILLE   2   0.025   $40,970.79   0.03
CARTERSVILLE   1   0.045   $7,000.00   0.05