Cognos Analytics

 View Only
  • 1.  Dynamic Display Different Measures on Line Chart

    Posted Tue June 20, 2023 01:44 PM
      |   view attached

    Hello,

    I'd like to have a report or dashboard where users can select one or more measures to display on a chart without going into edit mode and without using javascript. 

    In my case I'm using a line chart to view measures over time. I have four measures I want to be able to display on the line and for the user to choose to show all four or a combination of the available measures on the chart. I was thinking some series of drop down or a check box prompts but I'm not sure. I'm attaching a screenshot as a mockup where I've chosen two out of four measures to display.

    Does anyone have thoughts on how I might do this? Again, it can be in a dashboard or report if one is easier to do than another. We are using Cognos 11.2.2.

    Thanks,
    Jeremy



    ------------------------------
    Jeremy Aude
    ------------------------------


  • 2.  RE: Dynamic Display Different Measures on Line Chart

    Posted Tue June 20, 2023 03:27 PM
      |   view attached

    There are a few ways you could do this. Is your source dimensional or relational? 

    Based on the screenshot it looks like it might be relational, so take a look at the attached report. 

    I have a multiselect prompt with measure names in it, and in each of the measure data items I have the following pattern:

    #case join('',grep('Quantity',split(';',promptmany('Measures','token','NA'))))
    when 'Quantity' then '[C].[C_Great_outdoors_sales_data_module].[page_6].[Quantity]'
    else 'null'
    end#

    If the given measure isn't selected in the prompt, it will return null. 



    ------------------------------
    Paul Mendelson
    ------------------------------

    Attachment(s)

    txt
    report.txt   5 KB 1 version


  • 3.  RE: Dynamic Display Different Measures on Line Chart

    Posted Wed June 21, 2023 03:08 AM

    My approach would be a bit long-winded, and I definitely wouldn't want to do it for more than, say, four measures. I'd create a chart for each combination, then control which one gets displayed using render variables. In your case I think you'd need 15 charts and the corresponding 15 render variables. If you've got x measures and they can either be yes or no, then you've got 2-1 combinations...so x getting big would be decidedly cumbersome



    ------------------------------
    Chris Turner
    ------------------------------



  • 4.  RE: Dynamic Display Different Measures on Line Chart

    Posted Thu June 22, 2023 03:00 AM

    If you want something that works using the interactive viewer, then the attached report will do so.

    You can also replicate this technique within a data module that will give you the same functionality within a dashboard.

    I can't upload a report spec, but the basics is:

    Query that looks like:

    Each of the measure queries looks like:  

    With the Measure data item being the literal string for the measure, such as 'Revenue'.

    The union query looks like:

    It's this that you would put into a data module to replicate in a dashboard.

    And the report graph looks like:  



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



  • 5.  RE: Dynamic Display Different Measures on Line Chart

    Posted Mon June 26, 2023 01:42 PM

    Hi Marc,

    Thanks for the suggestion. I haven't seen that type of prompt before. Is it a newer version of Cognos? We're on 11.2.2.



    ------------------------------
    Jeremy Aude
    ------------------------------



  • 6.  RE: Dynamic Display Different Measures on Line Chart

    Posted Tue June 27, 2023 02:43 AM

    This is a feature of the 11.1 visualisations

    A client side chart rendering engine. Which means you can do client side filtering on charts.

    The advantage of this method is all the data is on the client side. Changing what measures you show would be instantaneous for the user - and probably with some nice animation too. You can add more data to them, giving the user the ability to filter on things that are not shown in the chart. (I think this is what 12's new client side dashboard cache is all about).

    They do have some limitations though - limited formatting, no master detail, limited PDF printing (improving in 12), different charts dont have a common filter box... But in some circumstances they might be useful.



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



  • 7.  RE: Dynamic Display Different Measures on Line Chart

    Posted Tue June 27, 2023 08:10 AM

    Hi Marc, Thanks for sharing. I haven't been aware of the fact that these filters are working only locally. Going the same way (On-Demand-Toolbar > Filter) for (e.g.) report lists is applying filters to the underlying query and is so affecting other data containers (including visualizations) using the same query as well. It woul be great if this would work for visualizations the same way. Alternatively or supplementary it would transfer a strong feature from dashboards to reports if the "click-filters" from the dashboard "widget connections" would also be available for report. Does someone know if one of these or both are on the IBM roadmap?



    ------------------------------
    Philipp Hornung
    Business Intelligence Manager
    Techniker Krankenkasse
    Hamburg Germany
    #IBMChampion
    ------------------------------



  • 8.  RE: Dynamic Display Different Measures on Line Chart

    Posted Tue June 27, 2023 08:33 AM
    Edited by Marc Reed Tue June 27, 2023 08:34 AM

    The Data Table works in a similar way. This is why these objects can only have (limited) aggregation or certain measures. For example, you can't have a percentage after roll up calculation on local data. 

    Agree - it would be nice if all the objects on a report could listen to each other, or you could choose what listens to what (hang on, I've got an old friend called Active Report who wants to say something...)

    The interactive viewer on traditional objects - such as lists, crosstabs, c10 graphs, can do this if they are all based on the same query. And i think that this would be the behaviour most novice report authors and consumers would expect. If I filter this, change all the things on the page.

    Which is why I think this box is a bit of a missed opportunity...

    This box is fine for the expert authors. We understand the implications. But for a novice user it doesn't mean anything. If it was phrased in a way relating to the interactive viewer then it would make more sense.

    Maybe show all the queries and the objects that relate to each query, and then say - which of these existing things do you want to interact with the new thing...



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