COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: markcognos on 22 Nov 2011 10:08:19 PM

Title: Need Help - Crosstab Column Total not working
Post by: markcognos on 22 Nov 2011 10:08:19 PM
------------------------------------------------------
           NEW YORK  | JAPAN         | INDIA         | total
item     case |count|case|count  | case|count |  count
--------------------------------------------------------
book    | 100| 1     | 10   |   1     |  0     |  0    |   2
cup      |   0  | 0     |  8    |   1     |  0     |  0    |   1
pencil   |   9   | 1     |  0   |   0     |  0     |  0    |   1


Hi Need Help
I Have a sample AbovE Crosstab,In My Report the total count is wrong in my query
The total count should be like example above.
Can you help for my problem?

My data Item in Count is -name of data item is [COUNT] --my query is

if([case]<>0) then
(count(distinct([case])))
else
(0)

My total count Is - name of data item is [Total Count]  -my query is
total([COUNT])


But the total count in my report is wrong.What shold i do??Must have a total like in the above example


Thanks,


Title: Re: Need Help - Crosstab Column Total not working
Post by: markcognos on 22 Nov 2011 10:17:26 PM
Hi..

I Also used

Data item = total count

total([COUNT] within set [area])

and my total count is correct but..When i used my report in Top 10 - My BottomCount is not working propertly..becouse i use whithin a set in my report..
Title: Re: Need Help - Crosstab Column Total not working
Post by: HalfBloodPrince on 23 Nov 2011 01:04:03 AM
create query calculation  count as

if(case <> 0) then
(1)
else
(0)

then create new query calculation as Total Count as
Total(count)

Try and let me know
Title: Re: Need Help - Crosstab Column Total not working
Post by: markcognos on 23 Nov 2011 01:08:57 AM
Hi already did this in my query.

DATA ITEM = COUNT
if([case]<>0) then
(count(distinct([case])))
else
(0)

Then i Created DATA ITEM = total_count
total([COUNT]).

total Does not work in crosstab.

Thanks
Title: Re: Need Help - Crosstab Column Total not working
Post by: markcognos on 23 Nov 2011 06:52:04 PM
any idea to total the count without using within a set??