COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: peewan on 30 Jan 2020 11:41:22 AM

Title: Crosstab - Average/Total cross
Post by: peewan on 30 Jan 2020 11:41:22 AM
I'm doing crosstab report, and adding data item:

Average Age = Average ([Age by current_date] for {gender-Relation])

Detail aggregation: Average
Summary Aggegation: default

All average for single column came out good, but cross Total/Average is wrong. Average Age for all should be 35.85 not 223
please see my screenshot
How do i fix that? Thank you
Title: Re: Crosstab - Average/Total cross
Post by: MFGF on 30 Jan 2020 01:02:49 PM
Quote from: peewan on 30 Jan 2020 11:41:22 AM
I'm doing crosstab report, and adding data item:

Average Age = Average ([Age by current_date] for {gender-Relation])

Detail aggregation: Average
Summary Aggegation: default

All average for single column came out good, but cross Total/Average is wrong. Average Age for all should be 35.85 not 223
please see my screenshot
How do i fix that? Thank you

Hi,

Two things to try:

1. Set the Summary Aggregation to Average
2. Set the Solve Order of the Average summary to 2

Let us know if these work.

Cheers!

MF.
Title: Re: Crosstab - Average/Total cross
Post by: peewan on 30 Jan 2020 04:42:12 PM
Quote from: MFGF on 30 Jan 2020 01:02:49 PM
Hi,

Two things to try:

1. Set the Summary Aggregation to Average
2. Set the Solve Order of the Average summary to 2

Let us know if these work.

Cheers!

MF.


It still not working. I changed:

[Average Age] data item property
Detail aggregation: Average
Summary aggregation: Average
Solve order: 2

I see you said ' Set the Solve Order of the Average summary to 2', but when when click on [Average Age] data item, just have 1 Solve order (at the end of data item property), I put 2 there. Don't have any Solve order separate for Detail and Summary.
Title: Re: Crosstab - Average/Total cross
Post by: peewan on 30 Jan 2020 05:23:34 PM
And again, in the attachment:

223.30 is Total of Average Age, and I would like Average of (total/all) Ages.

Thank you a lot.
Title: Re: Crosstab - Average/Total cross
Post by: seb24c on 31 Jan 2020 08:08:24 AM
Select the Total column header (crosstab node member) and change the Summary property to Aggregate. Then it should total each Age Range row and average the Average Age summary.
Title: Re: Crosstab - Average/Total cross
Post by: peewan on 31 Jan 2020 09:05:02 AM
Quote from: seb24c on 31 Jan 2020 08:08:24 AM
Select the Total column header (crosstab node member) and change the Summary property to Aggregate. Then it should total each Age Range row and average the Average Age summary.

No. All total colunm (Gender-Relation) went wrong, gave me the value of colunm next to it.
Title: Re: Crosstab - Average/Total cross
Post by: seb24c on 31 Jan 2020 09:54:34 AM
Strange, that worked for mine (attached).

You could change the cell to Define Contents: Yes and then drop in a separate calculated average.
Title: Re: Crosstab - Average/Total cross
Post by: peewan on 31 Jan 2020 02:49:19 PM
Ok, I get it to work now.
After looking at your attachment i made some changes.

First, I changed: Average Age = Average ([Age by current_date] for {gender-Relation]) to Average Age = Average ([Age by current_date])
Detail aggregation: Calculated
Summary Aggegation: default

Second, in crosstab, Total for Gender change Property Summary to Aggregate.

Thanks a lot!!!!!!! :)