Cognos Analytics

Cognos Analytics

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

 View Only
  • 1.  adding calculation on dashboard

    Posted Thu October 21, 2021 01:32 PM
    Hi to all,
        we have a dashboard on a dimensional model, and a crosstable visualization that show in row the City and in columns the years and use a misure as a value.
    What we want to do is to introduce another column that calculate the difference between two years (as show in picture belowe)



    ------------------------------
    Vincenzo gonino
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: adding calculation on dashboard
    Best Answer

    Posted Fri October 22, 2021 02:13 AM
    Hi Vincenzo,

    well I came to the conclusion that in most cases Dashboards are here to show data "as is". It's not as flexible as Report Studio but you can try a few things.
    Of course you can create a calculation based on your time dimension:
    Open the context menu with a right-click and choose "Calculation".

    Drag the members on your calculation editor with the right formula like "2012-2011":

    Now you can use the calculation in a viz. Unfortunately you can not add it as another coulmn or row - as far as I know this is only possible in Report Studio. We also use those calculations and tweka the dashboard canvas a bit with overlapping visualizations.
    You can add this calculation as another measure but then you'll get the value below every year:


    Another way would to change the model of your cube so that the time dimension already contains the needed calculations as members.
    You can also create a calculated set in your Dashboard but keep in mind that you have to convert the calculation into a member:

    Then show the created set in columns:

    Hope this helps.



    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ
    Ingelfingen
    ------------------------------



  • 3.  RE: adding calculation on dashboard

    Posted Fri October 22, 2021 04:23 AM
    Edited by System Admin Fri January 20, 2023 04:31 PM
    Hi Robert, 
       a light in the dark of the dashboard :)

    Question: How can I do if a want to show in a viz only the difference?  

    What do you think about "running-difference" ? Can I use to get the same result ( if I use the correct "at" and "for" clause)?
    If I want to calculate for example the average between the two date, need I to write the formula or can I use the average function? 

    Thanks for all. 


    ------------------------------
    Vincenzo Gonino
    ------------------------------



  • 4.  RE: adding calculation on dashboard

    Posted Fri October 22, 2021 04:30 AM
    Hi Vincenzo,

    just use the calculation as value - that's all. Maybe you have to adjust the aggregation rule of the calculation. Just open the properties via right-click on the calculation in the source pane on the left.

    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ
    Ingelfingen
    ------------------------------



  • 5.  RE: adding calculation on dashboard

    Posted Fri October 22, 2021 06:45 AM
    Hi (guru) Robert
    thanks, I tried but I get some errors that I try to solve. 

    In the same scenario, what do you think about "running-difference" ? Can I use to get the same result ( if I use the correct "at" and "for" clause)?
    If I want to calculate for example the average of a misure between the two date, need I to write the formula or can I use the average function? 

    Thank's in advance. 


    ------------------------------
    Vincenzo gonino
    ------------------------------



  • 6.  RE: adding calculation on dashboard

    Posted Fri October 22, 2021 07:50 AM
    Edited by System Admin Fri January 20, 2023 04:29 PM
    Hi Vincenzo,

    those functions are best used with a relational data module (tables), not OLAP. If you'd like to achieve a running total/difference I suggest to use the PeriodsToDate function together with CurrentMember to iterate over your time dimension. I'm using this approach for running-totals in reports based on cubes.
    Everything else I cannot say as I don't know your data and your cube structure.

    Regarding average: you can also adjust the aggregation rule of your calculation when you uncheck the "Calculate after aggregation" property:

    Depending on what average you exactly want to compute this might be an option.

    I'd also suggest to have a look at the IBM Accelerator Catalog where some videos are linked which describe how to build dashboards.

    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ
    Ingelfingen
    ------------------------------



  • 7.  RE: adding calculation on dashboard

    Posted Fri October 22, 2021 08:47 AM
    Thank you very much Robert!

    ------------------------------
    Vincenzo gonino
    ------------------------------