COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Sekhar8910 on 30 Aug 2013 02:17:24 AM

Title: Help on Distinct count
Post by: Sekhar8910 on 30 Aug 2013 02:17:24 AM
Hi, I need help on distinct count

Below is the report structure

Customer Name   State   Region   Sales Centre
Raj                     AP   South        ABC
Sekhar                     MP   Central      TUV
Raj                     AP   South      DEF
Chandu                     HP   North      JKL
Bala                     MH   West      PQR
Sekhar                     MP   Central      XYZ

Output should be
Customer Name   Count distinct
Sekhar                          1
Raj                          1
Chandu                          1
Bala                          1
Total Number of Customers   4

Should count the total number of customers by distinct count. I have tried by Count( distinct [Customer Name] for [State],[Region],[Sales Centre]) but did not work.

Please help
Title: Re: Help on Distinct count
Post by: Lynn on 30 Aug 2013 10:42:01 AM
So the scope of distinct is across the whole report? Raj gets counted as 1 without regard to any other values? If so, try this:

Count( distinct [Customer Name] for report )
Title: Re: Help on Distinct count
Post by: Gowtami on 02 Sep 2013 12:05:28 AM
Hi Sekhar,
I have similar problem in one of my reports. Please share it, If you find any solution. I tried count distinct, it didn't worked for me. Mine is Power cube, a simple list report, and i need to count distinct employees for multiple pay periods in all locations. I tried to change measure rollup functionality in transformer and also few other trials, but endup with nothing.

Thanks,
Gowtami