COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: venkiatmaruthi on 23 Feb 2011 06:51:20 AM

Title: what total ( [ distinct ] expr for report ) does?
Post by: venkiatmaruthi on 23 Feb 2011 06:51:20 AM
Hi

what the below syntax does?
total ( [ distinct ] expr for report )

I have one column 'Percentage' in my report
[Number of items]/total([ItemCount] for report)

I didn't understand what 'for report' do?

Becuase of this Percentage is coming in chart for my report when I run from Cognos connection. If I run from Report studio, its not coming.

I don't know but I feel for report is the reason for the above behaviour.
Title: Re: what total ( [ distinct ] expr for report ) does?
Post by: blom0344 on 23 Feb 2011 02:29:42 PM
Normally a measure/fact is aggregated against the set of dimensions used in a report. If you would want the grand overall total  than you can use the context 'for report'.  The distinct can be added to removes duplicates from the aggregate.

So, in your case , the total([Itemcount] for Report) should yield the overall total of Itemcount
Title: Re: what total ( [ distinct ] expr for report ) does?
Post by: venkiatmaruthi on 24 Feb 2011 04:13:59 AM
Thanks a lot for you explanation blom0344.