Topic
  • 4 replies
  • Latest Post - ‏2013-05-01T16:26:40Z by Glen.S
bb_22
bb_22
4 Posts

Pinned topic top 10 query not working with chart

‏2013-04-24T22:33:59Z |

 

I am trying to get the top 10 results from a query.  Per many suggestions I added a data item, rank_item,  to calculate the rank() for my fact.  I then added a filter to the query to limit the number of records being returned.

        rank_item <= 10

However, this resulted in an error: "Unable to stitch the query correctly. The query contains filters which use multiple facts.".  So, I created an 2nd query and and used the 1st query as input.  I then added the filter on query2 to limit the number of records based on the rank_item.

I was then able to use query2 in a list and it did return just the top 10 records.  However, when I attempted to use query2 in a chart the results were no longer limited to the top 10 records.  Why would the chart behave differently than the list?

If I "View Tabular Data" on query2 the results are correct and consistent with the list.  The issue is somehow with the chart.

 

Questions:

  1. is this a standard way to create a Top 10 report?
  2. why does the chart not display the query2 results correctly when the list does?

 

thanks,

Brett Bandy

  • OpherB
    OpherB
    770 Posts

    Re: top 10 query not working with chart

    ‏2013-04-25T18:00:00Z  

    I don't understand why you are getting the error message or the behavior of the chart.

     

    Can you post the XML report definition so it can be evaluated?

    Also, what is your data source and environment?

    Regards,
    Opher

     

  • bb_22
    bb_22
    4 Posts

    Re: top 10 query not working with chart

    ‏2013-04-25T18:29:50Z  
    • OpherB
    • ‏2013-04-25T18:00:00Z

    I don't understand why you are getting the error message or the behavior of the chart.

     

    Can you post the XML report definition so it can be evaluated?

    Also, what is your data source and environment?

    Regards,
    Opher

     

    The report definition is attached.  My environment is as follows...

    Data source is oracle 11.2.0.1.  Cognos is version 10.1 running on windows server 2003.  I am using a DMR model for my reports.

    any suggestions would be welcome.

     

    thanks,

    Brett

    Attachments

  • OpherB
    OpherB
    770 Posts

    Re: top 10 query not working with chart

    ‏2013-04-25T19:38:13Z  
    • bb_22
    • ‏2013-04-25T18:29:50Z

    The report definition is attached.  My environment is as follows...

    Data source is oracle 11.2.0.1.  Cognos is version 10.1 running on windows server 2003.  I am using a DMR model for my reports.

    any suggestions would be welcome.

     

    thanks,

    Brett

    Unfortunately, I'm still on 8.4.1. Looking to get access to a 10.1 "sandbox" in the next week or so as we plan our move.

    In the meantime, I am unable to look at your report layout. Scanning the XML it looks right, but there is obviously something wrong.

    Opher

     

     

  • Glen.S
    Glen.S
    20 Posts

    Re: top 10 query not working with chart

    ‏2013-05-01T16:26:40Z  

    This is probably beyond the scope of where you are at the moment, but looking forward, you may want to consider putting your data in dimensional form, where topcount is a built-in function