COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: esanray on 05 Apr 2011 09:10:03 PM

Title: count statment with the following query
Post by: esanray on 05 Apr 2011 09:10:03 PM

My database contain following types of data

Reason                    airlines       Date
Delay      Air India   04/04/2011
Cancel      polynasia   05/04/2011
Delay      Singapur   05/04/2011
Delay      Air India   05/04/2011
Cancel      polynasia   05/04/2011
Delay       Singapur   06/04/2011



I want to know how to count the delay & cancel reason airline wise. In frame work manager level or report studio level. so that I can create the following type of report

Operation Date. 05/04/2011           
Flights   Air India   Poly    Singapur
Delay   1   0   1
Cancel   0   2   0


Title: Re: count statment with the following query
Post by: cognostechie on 06 Apr 2011 12:23:46 AM
It depends on what is the uniqueness of the data.

If you have only one record for each of those rows then add a Query Calculation called
'Count' and just put 1 there.

In the Report, use a Crosstab, put Reason in the Rows and Airlines in the column and Count
in the measure.

If the data is not unique for the set you have shown then use Select Count distinct .