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

How to display yesterday's figures

Started by _jl_, 22 May 2013 05:43:43 AM

Previous topic - Next topic

_jl_

Hi,

How can I display only yesterday's data in a crosstab? The "Day" information (see attachment) is in '2013/05/21' format. I have tried several ways but wasn't able to get it to work. :(

CognosPaul

Is this DMR or a proper olap cube?

If it's a proper cube, open the members for the Day level, right click on one of them and take a look at the member unique name.

It might look something like:
[Cube].[Time].[Time].[Day]->:[PC].[@MEMBER].[20130522]

Since the key of the member is a simple yyyymmdd, building the mun is simple:
#'[Cube].[Time].[Time].[Day]->:[PC].[@MEMBER].['+timestampMask(_add_days($current_timestamp,-1),'yyyymmdd)+']'

Stick that into the slicer and it will filter the entire query.

_jl_

Yes, member unique name is in that form.

I didn't get it to work, though. Did you mean I should just drag the item 'Day' from Data Items -list to "Slicer" list in the Query explorer. And after that, set an expression to that Day: #'[Cubename].[All Dates].[All Dates].[Day]->:[PC].[@MEMBER].['+timestampMask(_add_days($current_timestamp,-1),'yyyymmdd)+']'

If so, it's giving an error... Attached.

CognosPaul

You forgot the closing hash # at the end

_jl_

It gives the same error even if I add the #-sign in the end.  :(

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

Ideas?

BR,
jl

CognosPaul

Parsing errors indicate problems with the code. Usually typoes or forgetting something. It looks like you also forgot the closing ' after the date format. 'yyyymmdd'

_jl_

That's correct, working now. Thank you!

jl