﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Data Warehousing / Analysis Services  / Difference between Cube browser and Excel 2007 for MDX Named Sets (Previous week) / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 24 May 2012 11:51:58 GMT</lastBuildDate><ttl>20</ttl><item><title>Difference between Cube browser and Excel 2007 for MDX Named Sets (Previous week)</title><link>http://www.sqlservercentral.com/Forums/Topic821744-17-1.aspx</link><description>I am really stuck, having spent an entire day trying to analyze what the &amp;^&amp;% 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([b]1[/b],[current_Week].Item(0).Item(0).PrevMember)When I look in the cube, the result is like this:Week 46, 2009     3245[b]But on excel, no values are reported![/b]When I change the code of the named set "previous week to:LastPeriods([b]2[/b],[current_Week].Item(0).Item(0).PrevMember)Then the cube shows:week 45, 2009   2318week 46, 2009   3245and excel showsweek 45,2009    2318Doe 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</description><pubDate>Thu, 19 Nov 2009 09:39:52 GMT</pubDate><dc:creator>jbreugelmans</dc:creator></item></channel></rss>
