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

WTD

Started by dollipi, 13 Jun 2014 04:49:47 AM

Previous topic - Next topic

dollipi

Hello,

how I can get Week to date? Can anyone help?

BR
D.

BigChris

Give us a clue...

dollipi


I have a report that show the YTD and MTD. Now I need WTD

For MTD I use this:

Date Item: extract(month;cast([Invoice Date (Inv)];date))

+

Filter: [Extract] = (extract(month;current_date))

But "week" doesn't work....


dollipi

[Extract] is the data item

BigChris

So do you need something along the lines of...

Filter:  extract(month;cast([Invoice Date (Inv)];date)) = (extract(month;current_date)) AND extract(week;cast([Invoice Date (Inv)];date)) = (extract(week;current_date))

I don't use extract myself, but i'd have thought that that would work...

dollipi

I thought it too, but unfortunately no.

But should you have another proposal (without extract), I would be very thankful...


BigChris

Ok...how about something like:

[Invoice Date(Inv)] >= _add_days(getdate(),_day_of_week(getdate(),1)*-1)

You might need to play around with the _day_of_week function to get the right start of your week, but that should give you something close to the answer.

Cognos.Developer

Hi Friends,

I thought the following link may help to solve this query.

http://www.forumtopics.com/busobj/viewtopic.php?t=196432&view=next&sid=d62ce7620be9f57299f719600f2e56d5


Thanks
Kumar