Active IQ Unified Manager Discussions

DWH report with date prompt


Hi all,


I m trying to build a report with a date prompt feature.


my sql table is something like that




for each date, I have for each object a list of kpi

a select object,date from table can give that












I 'd like to have by default the report to use the latest date ( max(date) ) and the ability to use the dateprompt to select on specific date.


I guess I have to use a parameter to the query, and set this parameter at the latest date by default ...

but I don't know how.



Thanks a lot for your help





Re: DWH report with date prompt


Dynamic date prompts in Cognos are not as straightforward as one might hope. IBM has a developer proven practices article that goes through how to use JavaScript to achieve something similar to what you're trying to achieve:


I haven't tried it myself, but hopefully it gets you on your way.



Re: DWH report with date prompt


Sorry for the late reply. 


This turns out to be a bit of a big question.  I will try to steer you toward breaking it into some pieces. 


I would create a query just to collect the latest date in the part of the DWH you're using.  Note that in dwh_performance, this will probably be one day earlier than in dwh_capacity so you will want to verify that the date that comes back does have the data you need.  Because I habitually use SQL, I'd do something like "select max(fulldate) from date_dimension where latest=1". 


Once you have that query, you can use its output as the default value in your date prompt. 


The other reply will provide some guidance on how to get the prompt put together.  That's a bit of a process.  Haven't used that how-to myself.  Googling around for date prompt in Cognos should help.  If you can get Cognos to understand that your'e prompting for a date, it should provide  a calendar interface for the selection. 


Good luck. 

2021 NetApp Partner Experience Survey
PES Banner
All Community Forums