COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: JohnnyCat on 25 Jul 2006 12:45:25 PM

Title: Total two columns from different queries
Post by: JohnnyCat on 25 Jul 2006 12:45:25 PM
Hello,

I have two different queries in my report.Ã,  Both are a count of employee, but they are from different tables.Ã,  How can I calculate the sum of all employees in list A and employees in list B, i.e. have a grand total of all employees from both lists?Ã,  Also, there is no relationship between these two tables.Ã,  Some employees are stored in table A, others are stored in table B.Ã,  I am using Cognos 8.

Thanks for your help.
Title: Re: Total two columns from different queries
Post by: MFGF on 26 Jul 2006 03:28:19 AM
If the queries have the same number of items (with the same data types) you can union the queries together into a higher-level query, and perform your calculation there.

Regards,

MF.
Title: Re: Total two columns from different queries
Post by: JohnnyCat on 26 Jul 2006 09:22:27 AM
Thanks,  that got me going.  The queries didnt have the same number of items, but I managed to work around it.
Title: Re: Total two columns from different queries
Post by: mrcool on 28 Jul 2006 03:49:09 AM
Try 2 use tabular set....
Title: Re: Total two columns from different queries
Post by: MFGF on 28 Jul 2006 06:25:16 AM
Hi MrCool,

Just to clarify, there's no longer any such thing as a Tabular Set in Cognos 8, which JohnnyCat is using here.  Tabular Sets have been replaced by Query Unions in Cognos 8.

Regards,

MF.
Title: Re: Total two columns from different queries
Post by: mrcool on 08 Aug 2006 12:22:52 AM
Oh ok...thank u
Title: Re: Total two columns from different queries
Post by: tosty on 06 Sep 2006 01:19:12 AM
Hi JhonnyCat,

can you tell me how you were able to solve this issue.

Thanks...