SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On



Difference between Cube browser and Excel 2007 for MDX Named Sets (Previous... Expand / Collapse
Author
Message
Posted Thursday, November 19, 2009 9:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 7:58 AM
Points: 1, Visits: 12
I am really stuck, having spent an entire day trying to analyze what the &^&% is going wrong:

I have a SSAS 2008 cube with a standard Time dimension (Dimensie Reporting Period.dim), which contains a hierarchy called "Tijd".

As we would like to report on current month, week etc. I have created named sets using MDX to provide me with relative periods in my reports. So far so goo. All "current ...." named sets work fine.

However when I try to create a "previous..." named set, there is a strange difference between the cube browser (which shows the right week), but excel is not showing any value at all.

My Named set "current Week" has the following code:
Tail(Filter([Dimensie Reporting Period].[Week].Members, Not IsEmpty([Dimensie Reporting Period].[Week].CurrentMember)),1)

And my Named set "previous week" has the following code:
LastPeriods(1,[current_Week].Item(0).Item(0).PrevMember)


When I look in the cube, the result is like this:
Week 46, 2009 3245

But on excel, no values are reported!


When I change the code of the named set "previous week to:
LastPeriods(2,[current_Week].Item(0).Item(0).PrevMember)
Then the cube shows:
week 45, 2009 2318
week 46, 2009 3245

and excel shows
week 45,2009 2318

Doe anyone know how (and why) this happens?? I tried all diferent scenario`s where i changed the lastperiod (to 1,0,-1) but the result stays the same...excel is not giving the previous week but it is showing 2 weeks before.

Hope you can help me.

Kind regards,

jeroen


Post #821744
« Prev Topic | Next Topic »


Permissions Expand / Collapse