COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gosoccer on 05 Jun 2017 01:36:58 PM

Title: (URGENT) Counts in Report Studio for the Same Car ID for Certain Condition
Post by: gosoccer on 05 Jun 2017 01:36:58 PM
Hi, :) :)
I have a Relational Implementation,

I have the following situation in our database table.
CAR ID          DATE SOLD            STATUS
BMW-1010     01/02/2015            IN GARAGE
BMW-1010     01/03/2015            NEW
BMW-1010     01/04/2015            IN GARAGE
BMW-1010     01/05/2015            NEW
BMW-1010     01/06/2015            IN GARAGE
BMW-1010     01/06/2015            NEW

So, the above should show me a count of 3 based on IN GARAGE and NEW for the SAME CAR ID.
Is there a way to handle this within the Report Studio or Framework Manager?

Thanks for your time.
Title: Re: (URGENT) Counts in Report Studio for the Same Car ID for Certain Condition
Post by: Drisya on 06 Jun 2017 06:41:41 AM
Try this.
Count([DATE SOLD] for [STATUS])
Title: Re: (URGENT) Counts in Report Studio for the Same Car ID for Certain Condition
Post by: hespora on 06 Jun 2017 11:02:44 AM
almost, I'd say

count([date sold] for [Car ID],[Status])


If you just count for status, that fails as soon as multiple cars are in the report.
Title: Re: (URGENT) Counts in Report Studio for the Same Car ID for Certain Condition
Post by: gosoccer on 06 Jun 2017 11:42:31 PM
Thanks so much! I'll try that..  :) :)
Title: Re: (URGENT) Counts in Report Studio for the Same Car ID for Certain Condition
Post by: Drisya on 12 Jun 2017 03:10:05 AM
Quote from: hespora on 06 Jun 2017 11:02:44 AM
almost, I'd say

count([date sold] for [Car ID],[Status])


If you just count for status, that fails as soon as multiple cars are in the report.

You are right. Of course, it depends on the underlying dataset.
Title: Re: (URGENT) Counts in Report Studio for the Same Car ID for Certain Condition
Post by: gosoccer on 15 Jun 2017 08:20:50 PM
Yes, that worked. Thanks a lot