COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: dzuser on 31 Jul 2015 12:03:30 AM

Title: Add Measure calculating Avreages of Avreages
Post by: dzuser on 31 Jul 2015 12:03:30 AM
Hi,

I have a table:
                         TransactionId,ProdcutId,SubCategoryId,CategoryId,Amount

I want to get One Measure that calculate:
1. [Avg(Amount) Of ProcuctId :   If i Select ProductId
2. [Avg of Avg(Amount) Of ProcuctId] : If i Select SubCategoryId
3. [Avg of Avg of Avg(Amount) Of ProcuctId] If i Select CategoryId.

Avg(Amount) By TransactionId By grouping is not working

can you help me pls ?

Thanks a lot
Title: Re: Add Measure calculating Avreages of Avreages
Post by: Lynn on 10 Aug 2015 05:04:33 AM
Quote from: dzuser on 31 Jul 2015 12:03:30 AM
Hi,

I have a table:
                         TransactionId,ProdcutId,SubCategoryId,CategoryId,Amount

I want to get One Measure that calculate:
1. [Avg(Amount) Of ProcuctId :   If i Select ProductId
2. [Avg of Avg(Amount) Of ProcuctId] : If i Select SubCategoryId
3. [Avg of Avg of Avg(Amount) Of ProcuctId] If i Select CategoryId.

Avg(Amount) By TransactionId By grouping is not working

can you help me pls ?

Thanks a lot

If you set the aggregation method of amount to be average then the figure should be averaged based on whatever else is included in the layout. I don't think you'd need separate query items for this as the single amount measure with average as the aggregation method should be sufficient. What do you mean by average of averages?

The "is not working" explanation is a real pet peeve and specifically addressed as a no-no in the forum etiquette. Some specific examples that show what you get vs what you expect might help you better illustrate your issue.