COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rpvs on 23 Feb 2011 08:16:37 AM

Title: Default Current Month from current date with Dimensional Model
Post by: rpvs on 23 Feb 2011 08:16:37 AM
Hi Gurus,

I am working on dimensional model and want the report to run for the current month based on the report date. The month level is



[Sales Analysis].[Account Totals Period].[Account Total Periods].[Month]



which has namespace,Dimension,Hierarchy,level for the time dimension.



Question is how do we extract the current month from the report date so that it equals the month level as above??? Currently i am asking the user to select it and run but would like it to default to current month and run automatically.
Title: Re: Default Current Month from current date with Dimensional Model
Post by: Shailaja0520 on 23 Feb 2011 10:38:29 PM
If you want to run the report with the default current month ,put a filter in your query..

Extract(month,current_date) --this will give you the month number
=
[Sales Analysis].[Account Totals Period].[Account Total Periods].[Month] --extract the month number from this column

hope you get this