COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: khabaleshri on 31 Jan 2019 11:08:10 AM

Title: Union query messed up running-difference calculation
Post by: khabaleshri on 31 Jan 2019 11:08:10 AM
Hi,
There are 3 queries in my report.
1st query - netted counterparties and exposure values
2nd query- unnetted counterparties and exposure values
3rd query - 1st query union 2nd query

First 2 queries gives me correct running difference but when I drag that running difference data item into union query, it gave me incorrect diff. Some negative values in between.
Only positive value expected.
Can anybody knows workaround

I have tried different aggregation properties and union all or union too but still no luck.

Tenor day expected diff
14                 14
28                 14
91                  63
So on
But getting some negative values in between

Running difference data item
Coalesce(running-difference(Tenor day for country party id, trade id),14)