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. :(
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.
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.
You forgot the closing hash # at the end
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
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'
That's correct, working now. Thank you!
jl