Author Topic: Chart Missing Observations  (Read 183 times)

Offline dougp

  • Statesman
  • ******
  • Join Date: Jul 2014
  • Posts: 631
  • Forum Citizenship: +23/-1
Chart Missing Observations
« on: 22 Feb 2021 04:04:50 pm »
I'm having trouble with a combination chart.  I'm using the old-school chart because same vis in the Legacy Visualizations and New Visualizations forces a second values axis with a different scale on the right.  I don't want that.

The trouble I'm having is that not all of the observations are showing up.  I have a page with a chart and a list.  Both use the same query, but some observations are missing from the chart.



Code: [Select]
[MATSLabNumberNumeric] = cast ( substring ( [MATS Lab Number], 6 ), int ) where MATS Lab Number is like FA0200088 (for the first observation in the list). All observations are displayed if the MATS Lab Number is used, but not if MATSLabNumberNumeric is used.

I have had the same results in all combinations of these: 
Cognos Analytics 11.0.13 
Cognos Analytics 11.1.7 
Interactive Viewer 
Compatible Viewer 
11.4 styles 
10.x styles 
combination chart 
bar chart 
column chart 
area chart 
line chart 

Any idea what could be causing this?  Is there a property I inadvertently flipped?
« Last Edit: 22 Feb 2021 05:22:14 pm by dougp »

Offline bus_pass_man

  • Statesman
  • ******
  • Join Date: May 2008
  • Posts: 455
  • Forum Citizenship: +44/-0
Re: Chart Missing Observations
« Reply #1 on: 22 Feb 2021 06:18:11 pm »


I think these are the data which are not showing up in the chart.  Interestingly, each of them have a value for calendare days in lab which already exists for calendar days in lab.
For example, 98 has a value of 19.   

100,99  19
101 28
104,106 16
102,105,107, 108, 109 23


What is the usage of calendar days in lab? Ditto for MATSLabNumberNumeric. I'd guess that it is measure for the latter.  Try to set it to attribute.

Is there any particular reason why you are casting the lab number substring to int? Is matslabNumberNumeric really an attribute?  For example, my age is an attribute even though it is numeric.






Offline dougp

  • Statesman
  • ******
  • Join Date: Jul 2014
  • Posts: 631
  • Forum Citizenship: +23/-1
Re: Chart Missing Observations
« Reply #2 on: 23 Feb 2021 10:47:57 am »
Quote
What is the usage of...
Quote
Try to set it to attribute.
Not sure what you mean.  All of this is happening in a report, not FM.

Calendar Days in a Lab is computed based on dates using _days_between.  Detail Aggregation = Summary Aggregation = Total.  But that probably doesn't matter since there will be only one [Calendar Days in a Lab] for each [MATSLabNumberNumeric]

MATSLabNumberNumeric is cast to an int to eliminate leading zeros and for sorting.  It is based on MATS Lab Number, which is an attribute = *Aggregation = none.

Regarding the values:
Yes, but 90, 91, and 92 all appear even though they all have the same value.

As I said, using the full MATS Lab Number functions fine.  But that's not what the reader wants to see.  They only want the sequence number, not the entire inventory code.


But thank you.  You sparked a thought.  If this is a typical request, why have the report developer do all of this work every time?  I'll see if performing the calculation in the model will help.

Online MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 11,202
  • Forum Citizenship: +662/-10
  • Cognos Software Muppet
Re: Chart Missing Observations
« Reply #3 on: 23 Feb 2021 12:10:08 pm »
Hi Doug,

Is there something funny going on in your report or your data? Is the data being served by a package or a data module? Anything funky going on in the package/module? I just mocked this up here by throwing the data into Excel, uploading it to CA and bringing it into a data module, then building what I assume is the same report over the data. I see all observations in my chart?



This tells me it should work - we just need to try to pinpoint why it isn't in your specific case.

Cheers!

MF.
Meep!

Offline dougp

  • Statesman
  • ******
  • Join Date: Jul 2014
  • Posts: 631
  • Forum Citizenship: +23/-1
Re: Chart Missing Observations
« Reply #4 on: 23 Feb 2021 02:02:03 pm »
Using a package with DQM.  Like I said, it works if I use the source column, just not the computed column.

Nothing funny with the data.  You can see the list shows it correctly.  For some reason the chart doesn't.

Online MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 11,202
  • Forum Citizenship: +662/-10
  • Cognos Software Muppet
Re: Chart Missing Observations
« Reply #5 on: 23 Feb 2021 03:50:09 pm »
Using a package with DQM.  Like I said, it works if I use the source column, just not the computed column.

Nothing funny with the data.  You can see the list shows it correctly.  For some reason the chart doesn't.

I'll try adding a calculation along similar lines and see if I can reproduce the issue. I'm not using a package though, but let's see.

MF.
Meep!

Online MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 11,202
  • Forum Citizenship: +662/-10
  • Cognos Software Muppet
Re: Chart Missing Observations
« Reply #6 on: 24 Feb 2021 07:41:32 am »
I'll try adding a calculation along similar lines and see if I can reproduce the issue. I'm not using a package though, but let's see.

MF.

Ok. I added a column to my spreadsheet with the same format as MATSLabNumber. I brought in the new version of the spreadsheet, updated my data module, and edited the report so that the MatsLabNumberNumeric value in the chart is now a query calculation using the expression you posted.

I still see all observations, so using the calculation for me didn't break anything.

We need Inspector Poirot on the case, I think :)

Cheers!

MF.
Meep!