cognoscognos-bicognos-8cognos-determinants

Continuous dates in Cognos


I need some suggestion to generate a continuous dates in between a specified selected date range in Cognos. I can create a separate Data item for this but I don't know what to do after that. Looking for a quick help


Solution

  • You need to get your list from a Calendar table which joins to your query in framework, or create a seperate Query Subject that pulls in the date list from a Calendar table or custom SQL. For more info on generating a range of dates using SQL see this: Generate a range of dates using SQL

    Once you have a query subject with a date field that contains 1 record per date you want, create a dummy field to use to join it to your main query. A simple data item named 'join1' with the value '1' will work. Create the same field in your main query. Join the two Query Subjects together on the 'join1' field. This is going to result in your data getting multiplied out into the date range. IE. If you have a main query that lists 1 record per employee, the result after the join will be 1 record per employee per date in your date range.