COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: daveterry1953 on 21 Sep 2009 04:07:59 PM

Title: Using Single Query for two Crosstab Reports
Post by: daveterry1953 on 21 Sep 2009 04:07:59 PM
I am using a join of two queries to build two crosstab reports.  In one of the crosstab reports I want to add a query calculation that calculates a percentage of crosstab1 total for a row/crosstab2 total for a row.  Cannot get this to work.  Can this be done and if so how?  format of crosstabs is below:

                                  Month of the year     Total            Month of the year                  Total    %
Business Unit                 Count of SARS Filed                     Count of Errors on SARS Filed
Title: Re: Using Single Query for two Crosstab Reports
Post by: kaevne on 22 Sep 2009 10:36:48 AM
Based on what you say, I believe you need to join the two queries on  "Month of the year" so Cognos can actually determine the column dimension to divide on.
Title: Re: Using Single Query for two Crosstab Reports
Post by: daveterry1953 on 24 Sep 2009 07:57:27 AM
Yes, I did join the two queries on file date and business unit.  I am trying to divide total sar errors by total sars filed.  Both of these totals are in the joined query in the main or parent portion of the query.  The query calculation is [Total(month_errors)]/[Total(month)].   The error I am getting is

PCA-ERR-0062

       The "cn" node is not expected to be a "value





Title: Re: Using Single Query for two Crosstab Reports
Post by: kaevne on 24 Sep 2009 09:10:54 AM
I think i see your problem.  In the combined query bound to the crosstab, create a DATA ITEM for the divided totals, not a query calculation.  Query calculations belong outside of the queries I believe.  Then add that data item to the crosstab.
Title: Re: Using Single Query for two Crosstab Reports
Post by: JBCLARK20 on 06 May 2014 04:01:42 PM
This issue still exists almost 5 years later in Report Studio v 10.2.1.
Fortunately I was able to find information about it here on Cognoise.
I am disappointed in the product design.
Cross tab technology has been around for a while.
Ended up redsigning a single query to take the place of the two queries I wanted to combine to power the crosstab.
See you never know who you may help even years after you post your questions.