Cognos Analytics

Cognos Analytics

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

 View Only
  • 1.  Doing my first deep dive into Cognos Analytics and looking how to do calculations

    Posted Thu August 08, 2019 09:23 AM
      |   view attached
    ​This is my first time doing a deep dive into Cognos  I got a data set of medical records. I can drop in a filter for gender or put it in the right side of a table to see the paid amount for females but I am not sure how I build a Query calculation to auto show this My best guess would be Create calculation select other expression (I not sure what the four choices of calculated member, calculated measure , set expression and other expression mean I looked in help but it just confused me more and have been using other expression) from there I drag over Paid from the membership folder type then type When and Drag over Gender and Female so it reads 
    total([Paid]) when [Gender] = [Female] but that does not seem to be valid when I run a check.

    ------------------------------
    John Mares
    ------------------------------

    #CognosAnalyticswithWatson

    Attachment(s)

    pdf
    2019-08-07_15-27-29.pdf   28 KB 1 version


  • 2.  RE: Doing my first deep dive into Cognos Analytics and looking how to do calculations

    Posted Thu August 08, 2019 09:44 AM
    Hi John,

    Please try something like:
    case when [Gender]='Female' then [Paid] end

    //Henk

    ------------------------------
    HENK CAZEMIER
    ------------------------------



  • 3.  RE: Doing my first deep dive into Cognos Analytics and looking how to do calculations

    Posted Tue August 20, 2019 03:44 PM
    Thanks it looks a lot better but it is still not working. The expression I am trying that throw the least errors is ​case when [Medical].[Gender].[Gender].[Gender]= [Female] then [Medical].[Measures].[Paid] end. The error I get is RSV-VAL-0010 Failed to load the report specifications XQE-PLN-0153. Found a comparison expression which is invalid in its context. Not sure what else I need and google does not help on the error.

    ------------------------------
    John Mares
    ------------------------------



  • 4.  RE: Doing my first deep dive into Cognos Analytics and looking how to do calculations

    Posted Wed August 21, 2019 08:43 AM
    Hi

    In case this is about mdx you should use if statement instead. Something like: If( [Medical].[Gender].[Gender].[Gender]= [Female]) then ([Medical].[Measures].[Paid]) else (something)

    ------------------------------
    Pekka Harmaala
    ------------------------------



  • 5.  RE: Doing my first deep dive into Cognos Analytics and looking how to do calculations

    Posted Fri August 23, 2019 05:54 PM
    Good Afternoon

    That does not seem to work either but I believe I found a work around using intersections.

    Thank you for your help.


    ------------------------------
    John Mares
    ------------------------------