Search code examples
cognoscognos-10cognos-bi

Options in Date Prompt in Cognos Studio


I have a date column in the database. I have got a "Date from" and "Date to" in the prompt page to filter the data.

Now, I want to give 3 options to user in the prompt page a) Year over Year b) Quarter over Quarter c) Month over Month

Say the user chooses Date-from as Nov 1st 2004 and Date-to as Nov 1st 2015 and selects "Year over Year" in the options The output should be just year over year bifurcation.

Im not able to get the 3 options and connect it to the date prompt field.

How do I achieve this?


Solution

  • I believe you need to use a compound filter to test both parameters:

    (?type? = 'Year over Year' and {Date logic using date parameters for YoY})
    or 
    (?type? = 'Quarter over Quarter' and {Date logic using date parameters for QoQ})
    or
    (?type? = 'Month over Month' and {Date logic using date parameters for MoM})
    

    You didn't indicate what the Year over Year etc logic should be but you should be able to adapt the pattern above.