Cognos Analytics

 View Only

Create dynamic calculation for each day in a date range

  • 1.  Create dynamic calculation for each day in a date range

    Posted Thu January 31, 2019 10:11 AM
    Hello all,

    In the attached report, I'm creating a data-item for each day and hard-coding the date to get my calculations.


    EX:

    Calculation for 1/15/2019:
    Total(if (booking_date <= 1/15/2019 and release_date >1/15/2019) then ([InmateCount]) else (0))

    Calculation for 1/16/2019:
    Total(if (booking_date <= 1/16/2019 and release_date >1/16/2019) then ([InmateCount]) else (0))

    Calculation for 1/17/2019:
    Total(if (booking_date <= 1/17/2019 and release_date >1/17/2019) then ([InmateCount]) else (0))

    How can I make this dynamic? so the date for each day is dynamically generated based on the range chosen at a prompt page?

    Any ideas greatly appreciated!
    #CognosAnalyticswithWatson