Cognos Analytics

Cognos Analytics

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

 View Only
Expand all | Collapse all

To validate Previous column value with current value

  • 1.  To validate Previous column value with current value

    Posted Fri December 17, 2021 11:09 AM

    Hello Gurus, I have recently started working with COGNOS in this year. I would like to know your ideas or suggestions to my requirement. I am currently development customer reconciliation report and there are 5 columns (DECIMAL) need to compare with Previous records. For example, I have two rows STEP 3 and STEP 4. Both rows contains 5 columns each as below.

    ---------------------------------------------

    STEP | INV | BL | MT | WH | X

    3 | 3490.78 | 767.23 | 23 | 56.45 | 9

    4 | 234.45 | 767.23 | 23 | 56.23 | 9

    ---------------------------------------------

    From above report, need to change "Conditional Styles" if STEP 3 of INV column value is different than STEP 4 of INV column value then RED.

    I can able to write Conditional Styles between columns in same row but not sure which function to use to compare STEP3.INV vs STEP4.INV. Kindly provide your suggestions or ideas here.






    #CognosAnalytics
    #CognosAnalyticswithWatson
    #Support
    #SupportMigration


  • 2.  RE: To validate Previous column value with current value

    Posted Sun March 27, 2022 02:22 PM

    Create two queries (A+B) and with a new data-item "newid" containing "ceil(STEP/2)".

    Query B should be filtered to "ceil(STEP/2) = STEP/2".

    Then join Query A + B on the item "newid" into a new query where columns from A+B are in one data row so Step 4 and Step 3 are in one row. Now you can compare value from INV on Step 4 with INV from Step 3 into a new data item and put conditional formatting on it.

    See detailed documentation here: https://github.com/AMVARA-CONSULTING/cognos/blob/master/report_with_conditional_formatting/README.md






    #CognosAnalytics
    #CognosAnalyticswithWatson
    #Support
    #SupportMigration


  • 3.  RE: To validate Previous column value with current value

    Posted Mon March 28, 2022 04:18 PM

    Hello r.roeber, thanks for your message. I will apply this solution to my Report. Once again Thank you.






    #CognosAnalytics
    #CognosAnalyticswithWatson
    #Support
    #SupportMigration