COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: SarahCL on 22 Jul 2015 02:30:51 PM

Title: Chart not displaying same data as table
Post by: SarahCL on 22 Jul 2015 02:30:51 PM
Hi all,

This one is a head scratcher for me and my team. We have a list that was created to determine if shipments arrived On Time, Late or if the status was Unreported. when I put the data into a pie chart, the Unreported numbers are completely off. Why is it not simply taking the number displayed on the table right above it like the two other items. See attachment.

Here are the expressions for each item for some backstory:

[New_On_Time] = If ( ( [Del Appt Scope] = 'Ok' ) and ( [DelDayMatch] is null ) )THEN ('On-Time' ) ELSE  Null

[Late>8]= IF( ( [Del Appt Scope] is Null  and   [Time_sign] = '-' and [Time_Diff_Day] > 0  ) or ( [Del Appt Scope] is Null and [DelDayMatch] = 'No')  ) THEN ('Late')  ELSE NULL

[Unreported]= If ([Del Appt Scope] is NULL and [DelDayMatch] is NULL and [New_On_Time] is NULL and [Late>8] is NULL) THEN ('Unreported') Else NULL

Each of the "Count" on the chart have the expressions built as: count ([New_On_Time]), count ([Late>8]) and count ([Unreported]) where the Aggregate Function is Calculated and Rollup Aggregate is Automatic. It works beautifully except for the Unreported. Is there somewhere in my Unreported expression something that makes it double count/take more data than what should be displayed?

Any help is appreciated!
Title: Re: Chart not displaying same data as table
Post by: gpollock on 23 Jul 2015 03:49:13 PM
This is strange.  What happens if you try this?  Change [New_On_Time] to return 1 or 0.  Same with the other two.  Set their aggregates to be total.  This way you can bypass the count data item and just have the report do the summaries for you.  Does your table match up from the chart now?  I think doing a count on strings might be an issue.
Title: Re: Chart not displaying same data as table
Post by: SarahCL on 06 Aug 2015 02:51:13 PM
thanks! It sounded like a great idea and I finally had time to look into it but I'm still having the same issue. It is overcounted the unreported in the chart but the count/total is correct in the table.