COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: kgl_m on 01 Apr 2009 10:55:40 AM

Title: Chart and counting data items
Post by: kgl_m on 01 Apr 2009 10:55:40 AM
Hi all, I have an issue with a chart.

This chart is supposed to measure values against date.

Category (x-axis): Date
Series: Product Type
Default measure (y-axis): Product count. This is what I'm having trouble with.

What I need is a chart with how many products we sold and the product types they were.

For the Count I'm using count([Order ID]). I've also tried count([Order ID] for [Date]) but that was worse. Gave me inaccurate results. Using running-count works in a list but not in the chart.

We don't have a count field in the database with how many products we sold in a day which is why I'm doing it in Cognos.

I also need this chart for an hourly report so I'd like to know how to roll up values by hour/day/week etc.

Thanks much!
Title: Re: Chart and counting data items
Post by: CognosSupport on 03 Apr 2009 12:43:33 AM
Hi,

Is the Order ID <-> Product ID has one to one or one to many relationship?
Title: Re: Chart and counting data items
Post by: CognosSupport on 03 Apr 2009 01:48:30 AM
Hi again,

I'm assuming you are testing with a normal column chart?
Using sample package GO Sales and Retailers, you can try:

1. Category: Date, Series: Product Type, Default Measure: Data Item called [Count]
2. What [Count] is just count([Product Name]), as your Order ID will be in relationship with Product ID normally. So you will need to first count without the roll up to Product Type, so just count the Product Name
3. Specify the interval in the chart
4. I assume your Order ID is unique, so with Order ID <-> Order Date 1 to 1, it should still show the result in the chart based on the date correctly

You are still displaying Product Type, so it will automatically rollup the count in Product Name to Product Type level