Cognos Analytics

 View Only
  • 1.  Two years, dynamicully in a crosstab

    Posted Fri May 05, 2023 03:50 AM

    Hi All,

    I made a crosstab in a report from a planning analytics source. 
    I created two parameters, one ?Year? and one ?Period? parameter.
    My question is, i have 11 columns, But i want to have the first 10 columns in the current ?Year? and the last column needs to pick up data from the previous year.
    I tried with an text attribute as you see here below, but he is still taking the current ?Year? data. 


    Best regards,
    Alexander



    ------------------------------
    Alexander Van herp
    ------------------------------


  • 2.  RE: Two years, dynamicully in a crosstab

    Posted Fri May 05, 2023 05:30 AM

    Haven't worked with planning analytics as source for a while, but this might help;
    How have you created the parameter, in the report? If yes, can you create a prompt macro, and use that to tuple with the 10 columns. Then manipulate the macro to subtract 1 (minus one year), and tuple that with the last column.Note that the prompt macro shouldn't be added in slicer section - only use it to tuple each measure.

    Nice guide regarding prompt macros: https://medium.com/@PMsquare/utilize-prompt-macros-in-cognos-34d6411537e1



    ------------------------------
    Sandeep DHIRAD
    ------------------------------



  • 3.  RE: Two years, dynamicully in a crosstab

    Posted Fri May 05, 2023 09:56 AM

    Hi,

    Assuming your ?Year? parameter is returning a MUN (Member Unique Name) from the PA cube in a query calculation using a dimensional expression, you should be able to use a lag() function in an expression to grab the prior year and include this in the final column.

    Cheers!

    MF.



    ------------------------------
    Mark Fry
    Technical Consultant
    ------------------------------