Re: MDX Help
- From: "Vidas Matelis" <Vidas.Matelis@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Mar 2007 22:30:06 -0400
Lawrence,
Based on your description I am assuming you would like to build a set:
Monday, Tuesday and do not include last day of the week that is Wednesday.
Try to build your set following this logic: <MemberFrom>:<MemberTo>
Example from AdventureWorks. Easier to show at month level, This will return
years 2004 January to : July, even we have data in August.
SELECT
{OpeningPeriod([Date].[Calendar].[Month], [Date].[Calendar].[Calendar
Year].&[2004])
: ClosingPeriod([Date].[Calendar].[Month], [Date].[Calendar].[Calendar
Year].&[2004]).PrevMember
} ON 0
FROM [Sales Summary]
WHERE ([Measures].[Sales Amount])
;
Vidas Matelis
WebLog: http://www.ssas-info.com/content/blogcategory/14/36/
I am assuming that in your description
"Lawrence" <Lawrence@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3271B6EF-E953-49AE-B187-EB2017D9D094@xxxxxxxxxxxxxxxx
Hello,
I have the following MDX Complication.
Goal - Return on the members UP TO the current day of the week. ie Today
is
Wednesday. I want to return all members Monday-Wednesday.
I currently have a Time.Test.[Current Day of Week] to find the current Day
of Week tuple.
Tail(Filter([Time].test.[day In week].Members,NOT IsEmpty([Time].test.[day
In week].CurrentMember)),1).Item(0)
Below is my [Previous Week] tuple. Is there a way to limit the member set
to only include members up to the current day of the week?
Tail(Filter([Time].[Week].Members,NOT
IsEmpty(Time.Week.CurrentMember)),1).Item(0).Lag(1)
Any help is much appreciated!
-Lawrence
.
- Follow-Ups:
- Re: MDX Help
- From: Vidas Matelis
- Re: MDX Help
- Prev by Date: Re: create installation files
- Next by Date: Re: SQL 2005 HTTP Access
- Previous by thread: Re: Adventure Works setup
- Next by thread: Re: MDX Help
- Index(es):
Relevant Pages
|