Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Retrieve Range of members of a level

0 views
Skip to first unread message

lmcphee

unread,
Oct 7, 2008, 9:55:02 PM10/7/08
to
Using AS 2000.
Have a Time dimension with levels Year, Month, Day, Shift.
I want to create a Named Set that returns all the members of Day level
between two given dates <date1> and <date2>.

The expression below, using Subset(), works, but I wondered if there was a
more elegant solution, perhaps using Filter().

select
{[Measures].[Count]} on columns,
Subset([Time].[Day].AllMembers, Rank((<date1>),
[Time].[Day].AllMembers)-1,
Rank((<date2>), [Time].[Day].AllMembers) - Rank((<date1>),
[Time].[Day].AllMembers)) on rows
from [MyCube]

Thanks,

Les McPhee

fim...@exologic.com

unread,
Oct 8, 2008, 4:05:37 PM10/8/08
to

Is the ":" operator not working for you? Try {[mbr1]:[mbr2]}.
You could also make those specific dates dynamic, or static.

-exologic

lmcphee

unread,
Oct 9, 2008, 8:41:01 AM10/9/08
to
Thanks, that is exactly what I needed. I have been using OLAP/MDX on and off
for a couple of years and got pretty handy with MDX, but (embarrassed to
admit) did not know about the ":" operator. Looked in my "MDX Solutions" book
- there it is on page 10! I always just used it as a reference - guess I
should read it from cover to cover.

Les McPhee

fim...@exologic.com

unread,
Oct 10, 2008, 12:56:35 AM10/10/08
to
> > -exologic- Hide quoted text -
>
> - Show quoted text -

It's more of a documentation issue to me, and a glaring lack of
Intellisense that should be inbued in the BIDS interface, also missing
in 2008.

0 new messages