Cognos Analytics

 View Only
  • 1.  Dashboard Line Charts

    Posted Mon September 28, 2020 09:40 AM

    For my Dashboard Line Graph, I have a single element for the y-Axis representing average $/hour and an element for color which represents what "bucket" that average $/hour is assigned.  In my case there are 3 "buckets" and therefor I get 3 different color lines.  All is good.  Then management asked for a Total Line.   So that I would want is my 3 original lines plus a 4th line representing the sum of the three lines. Is there a way to add a Total line to a Dashboard Line Chart ?  


    ------------------------------
    David Lydon
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Dashboard Line Charts

    Posted Tue September 29, 2020 09:18 AM
    Hi David,

    I don't believe there is any way to do this without some back-end modeling.  Since you are using dashboards you will need to get into some query manipulation using Data Modules or FM (you didn't mention what the dashboard was sourced from).  The easiest way is to take an exact copy of the query used to build the line chart you have, and just replace the query column that lists each "bucket" with a text string "Total".  You can then UNION these queries and you will get each "bucket" plus all of them combined in "total".

    If there is an easier way to do this, I would love to hear it but this is how I always had to achieve this.

    -Todd

    ------------------------------
    Todd Schuman
    ------------------------------



  • 3.  RE: Dashboard Line Charts

    Posted Tue September 29, 2020 10:59 AM
    Hi David, 

    You should be able to accomplish this with a few calculations at the dashboard layer - a case statement for each of the bucketed averages (i.e. case when color_by field = 'X' then average_field else 0 end) and then a sum of all three new calculations to get the total. You can then add these 4 fields into the y-axis slot. Hope this helps!

    Kait

    ------------------------------
    Kaitlyn Arnold
    ------------------------------



  • 4.  RE: Dashboard Line Charts

    Posted Tue September 29, 2020 02:16 PM

    Kait,


    Thanks!  I tried your method and it worked like a charm.👍  I was happy I could do it entirely in the Dashboard Edit UI.



    ------------------------------
    Dave Lydon
    ------------------------------