Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Top X for Stacked Bar/Column Chart

    Posted Mon November 13, 2023 01:34 PM

    CA 11.1.7

    In a Dashboard or Exploration, I have a Stacked Bar chart defined as follows:

    • Bars - Practices
    • Colors - Service Types
    • Length - Amount

    The list contains far too many practices to be useful, so I want to reduce to a Top 10/20 etc.
    What I want to get is the Top X Practices by Total Amount and their associated Service Types by color.
    There can only be a maximum of 4 Types for each Practice.

    However, when I put a Top Count on Amount, I believe I am getting the largest 10 Types and their associated practices.
    It is only showing 4 practices with what appear to be the largest 10 types by Practice - Based on the data what I am seeing makes sense for the Top 10 Types by Amount and their associated Practices, but clearly not what I want!

    Am I missing something simple?
    In my opinion, I don't think I should have to create a rank in the Data Module to enable this functionality.

    Thanks in advance,



    ------------------------------
    Adam McIlravey
    ------------------------------


  • 2.  RE: Top X for Stacked Bar/Column Chart

    Posted Mon November 13, 2023 05:50 PM

    Hi Adam,

    Have you tried to apply the top-operation to the Bars slot?



    ------------------------------
    Kind regards,
    Henk Cazemier
    ------------------------------



  • 3.  RE: Top X for Stacked Bar/Column Chart

    Posted Tue November 14, 2023 09:40 AM

    Henk...
    Thanks for the suggestion

    I have previously tried this (putting a Top X filter on Practice Name - Bars) and it appears to do nothing.
    Or it is potentially taking way too long to do anything to the point where use in a dashboard would be meaningless.

    Another indication that it is doing nothing is that it does not create a Widget Filter for Top 10 similar to when I do it on the Amount - Length field.

    Any other suggestions would be much appreciated.
    Thanks again,



    ------------------------------
    Adam McIlravey
    ------------------------------



  • 4.  RE: Top X for Stacked Bar/Column Chart

    Posted Wed November 15, 2023 03:39 AM

    Henk's suggestion normally works!

    Here is an example on Go Sales.

    This chart has 12 bars:

    Apply a Top filter as such:

    shows this:

    Performance will be down to the underlying datasource, rather than the dashboard tool itself. In this simple example, if you examine the sql that the database is doing you'll see the Dense Rank function, and then <5, to get the top 4

    Someone with some C12 knowledge may be able to comment if Top X functionality is covered in the new dashboard local cache capability. 

    there is nothing in the c12 docs that say it is/isnt.

    https://www.ibm.com/docs/en/cognos-analytics/12.0.0?topic=caching-specifying-data-elements-local



    ------------------------------
    Marc Reed
    ------------------------------



  • 5.  RE: Top X for Stacked Bar/Column Chart

    Posted Wed November 15, 2023 08:43 AM

    This is now resolved

    Thank you for the further help.
    Thanks also to @HENK CAZEMIER for taking the time to have a one-on-one with me to work thru the problem yesterday afternoon.

    This really was a "moment" on my end - What I missed was imputing in the "By" Field when setting the Top X filter on the Bars field.
    This makes total sense and was something I fundamentally knew, but was just missing.

    Thanks again,
    Adam.



    ------------------------------
    Adam McIlravey
    ------------------------------