COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: _jl_ on 27 Jun 2013 02:05:27 AM

Title: Solved: Date filtering (dates until yesterday), once again
Post by: _jl_ on 27 Jun 2013 02:05:27 AM
Hi,

Again ran into problems, so help is needed.  >:(

I have a dimension which shows the date information for current week (see attachment). From source there's data showing up from the future, like '2013/06/29'. How can I set a filter to my report that only figures that are up to yesterday are shown?

To show only figures for yesterday, this thing works:
#'[Cube].[Time].[Time].[Day]->:[PC].[@MEMBER].['+timestampMask(_add_days($current_timestamp,-1),'yyyymmdd')+']'#

But to show all the weekly data until that day. Help?  :o

BR,
jl
Title: Re: Date filtering (dates until yesterday), once again
Post by: MFGF on 27 Jun 2013 07:31:51 AM
How about:

lastPeriods(7,#'[Cube].[Time].[Time].[Day]->:[PC].[@MEMBER].['+timestampMask(_add_days($current_timestamp,-1),'yyyymmdd')+']'#)

This will show you the selected member and the prior 6 members

Or alternatively:

periodsToDate([your day level], #'[Cube].[Time].[Time].[Day]->:[PC].[@MEMBER].['+timestampMask(_add_days($current_timestamp,-1),'yyyymmdd')+']'#)

This will show you the selected member and all previous members from the Day level

Cheers!

MF.
Title: Re: Date filtering (dates until yesterday), once again
Post by: _jl_ on 28 Jun 2013 01:21:05 AM
Got both working. Thank You!  8)