Cognos Analytics

Cognos Analytics

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

 View Only
Expand all | Collapse all

Correlation function on dashboard

  • 1.  Correlation function on dashboard

    Posted Mon February 21, 2022 05:25 AM
    Edited by System Admin Fri January 20, 2023 04:46 PM

    Hi all,
    I'm trying to compute correlation between two variables, in cognos dashboard, as follows:
    corr( tuple(value;variabile1); tuple(value;variabile2))
    but the outcome is the following:
    The function corr is not supported by the origin data JD-D2
    i have tried to compute this on report too and i have the same error, but it works only with data produced by SQL query, if i put dimensional member in the same report query i have the same error 
    How i can compute on dashboard? 

    Thanks



    ------------------------------
    valerio pascarella
    ------------------------------


    #CognosAnalyticswithWatson


  • 2.  RE: Correlation function on dashboard

    Posted Mon February 21, 2022 08:00 AM
    Edited by System Admin Fri January 20, 2023 04:25 PM
    Hi Valerio,

    What is your datasource, version?
    (Edited to add: JD-D2 might IBM Db2)

    Best regards,

    ------------------------------
    Patrick Neveu
    Positive Thinking Company
    ------------------------------



  • 3.  RE: Correlation function on dashboard

    Posted Mon February 21, 2022 08:56 AM
    Thank you all,
    I'm using DB2 as datasource both for relational and multidimensional.
    The problem is that i can't write correctly the function using multidimensional model while using the relational one (Es. SQL query) i can do it.

    ------------------------------
    valerio pascarella
    ------------------------------



  • 4.  RE: Correlation function on dashboard

    Posted Mon February 21, 2022 09:19 AM
    Hi Valerio,

    if youre model is dimensional the relational vendor-based functions are limited to those who can be translated into local Cognos functions. E.g. "substr" is an Oracle db-function which can be used as "substring" in dimensional models but the expression will not be pushed to the database. Instead it will be computed by the local Cognos server.
    I don't know the correlation function and therefore I have no idea which might be the best equivalent in dimensional queries - if it exists.

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



  • 5.  RE: Correlation function on dashboard

    Posted Mon February 21, 2022 12:56 PM
    Ok Dostal, I can try to change the problem hoping your expertize can help me.
    If I want to extract from a dimensional model a numeric expression, how can I do?
    I have a dimensional model with a measure (mis1) and two dimension: Year (with member 2010, 2011, ...) and Country (with member Rome, Latina, Frosinone, etc etc)
    I want a list (string, numeric) like: 
    Rome, value mis1 for Rome
    Latina, value mis1 for Latina
    ...
    OR simply (numeric list):
    value mis1 for Rome
    value mis1 for Latina

    Thank's in advance Robert

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



  • 6.  RE: Correlation function on dashboard

    Posted Tue February 22, 2022 02:12 AM
    Edited by System Admin Fri January 20, 2023 04:44 PM

    Hi,

    if we talk about a simple list I would then choose table or crostab as visualization in a dashboard.

    If you want to concatinate real sentences like "Revenue for Rome is 4.1M€ in 2010" that's only possible in Report Studio as far as I know.

    But I'd like to go back to your request regarding the corr() function. What is your actual datasource? Is it a PowerCube, DMR-Model or a Dynamic Cube? If it's a dynamic cube you can create calculated measures on the cube level and on the database level. If it's a measure on the database level, you can then use the corr function.



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



  • 7.  RE: Correlation function on dashboard

    Posted Tue February 22, 2022 03:19 AM
    Hi Dostal, I'm very happy to see you!
    How can I do to create on Report studio your example?  ("Revenue for Rome is 4.1M€ in 2010")

    My datasource is a DMR-Model. I don't want to change FM, but found a solution on report studio. 

    Thanks in advance

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



  • 8.  RE: Correlation function on dashboard

    Posted Tue February 22, 2022 05:56 AM

    Hi Vincenzo,

    depending on what you want to create exactly, there are several solutions. I built a sample based on a repeater that simply groups by "Retailer site" and put text items and the data items in a block. That's it.

    Result:

    If your required layout is more complex you can also look at the repeater table or the list + text item in combination with a master-detail relationship. It's hard to predict what you really need for your report.



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



  • 9.  RE: Correlation function on dashboard

    Posted Tue February 22, 2022 06:05 AM
    well done Dostal, but I want to create a query with a data items that contains the string.
    But, I don't want to join my goal using a visualizzation. I need to create a data item that contain the list like a result from a query on a Database. 
    Have you any idea? 

    Thanks!

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



  • 10.  RE: Correlation function on dashboard

    Posted Tue February 22, 2022 07:59 AM

    Hi Vincenzo,

    I really have to admit that I'm lacking the time to dive deeper into your request.

    What I can say is that in a dimensional model you will always have query items which represent a single member (MUN), a value (measure) or a set of members like a level or a hierarchy. So if you want to have a "list" of elements you need a set (level, hierarchy, manual set or any function that returns a set of members). These members than combined with a measure will all have their corresponding value from the defined cube cell (also called tuple).

    Those member sets can then be used in member summaries to aggregate them to one value. These functions can also be standard-deviation or quartile:
    Syntax is <member summary function>(<value/measure> within set <set-expression>) e.g. rank([Revenue] within set [Locations]).



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