If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

extract week by selecting start date and end date

Started by shivani_cog, 04 Dec 2011 08:09:56 AM

Previous topic - Next topic

shivani_cog

Hi,
How do you display weeks by selecting start date and end date?
I know about _week_of_year works for this one.
I have created ?Begin_Date? and ?End_Date? prompts.
This is for the bar graph.
When users select start date and end date then week1 or week 2... should display in an x-axis of a bar graph.
Revenue should be aggregated by given week by selected item.

Thanks.

pricter

Create a filter on your date
For example

[Date] between  ?Begin_Date? and ?End_Date?
and the place your Week data item on x - axis

shivani_cog

Hi Pricter,
My model is in DMR. But this code does not work. What am I missing here?
[Sales (query)].[Time dimension].[Week of the year] between ?startdate? and ?enddate?)

Error: Unsupported conditional expression

pricter

I thought that you have a relational model

If I  remember well Sales (query) is a relational model and Sales (analysis) is a DMR

I do not have them in front of me but you have to filter the date query item not the week data item if you a relational model

shivani_cog

Hi Pricter,
My real project has DMR model.
There is no week of the year in the model. I have to create a new data item where it gives me a week number when user select begin date and end date from the prompt.
How do I achieve this?
cast([Order Detail].[Time].[Date].[Date].[Date], date) between ?BeginDate? and ?EndDate?
Thanks