Query?

Post Reply
goja09
Posts: 4
Joined: Thu Mar 05, 2009 8:27 am
Version: abc
Excel Version: 2003

Query?

Post by goja09 » Thu Mar 05, 2009 8:47 am

Hi,

I've just started using OLAP and i hava a problem with one mdx querry.

In general:

My cube looks in MSSQL Server Management Studio like:

Cubes -> StatCube -> Measure Groups -> "different measures"
Dimensions -> "different dimensions"

In dimensions among other things i have two dimensions:

1) TimeByMonth->year->month->day
2) TimeByHour->hours (24 members 00-01, 01-02 etc.)


My query looks like:

SELECT {[Dim1].[Dim1].&[value1],[Dim1].[Dim1].&[value2],[Dim1].[Dim1].&[value3],[Dim1].[Dim1].&[value4]}
on columns,
{
[Measures].[some measure],
}
on rows
from StatCube
where (
{[TimeByMonth].[TimeByMonth].[Day].&[93563]},
{[TimeByHour].[Hour].&[5]:[TimeByHour].[Hour].&[16]}
)

And I have a problem with clause where:

I can as it is in query above take statistics for one day [TimeByMonth].[TimeByMonth].[Day].&[93563]} and for different hours of this day {[TimeByHour].[Hour].&[5]:[TimeByHour].[Hour].&[16].

But, i haven't any idea how to do this for different days and different hours of each day.

For example, i want to have in clause where: one day from 03:00 to 13:00 and another day from 6:00 to 10:00?
"and operator" doesn't work.

Could you help me?

Regards
Jacek

User avatar
Eric
MVP
Posts: 373
Joined: Wed May 14, 2008 1:21 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003
Location: Chicago, IL USA

Re: Query?

Post by Eric » Thu Mar 12, 2009 5:09 pm

What OLAP system are you using?
Regards,
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1


Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003

goja09
Posts: 4
Joined: Thu Mar 05, 2009 8:27 am
Version: abc
Excel Version: 2003

Re: Query?

Post by goja09 » Thu Mar 12, 2009 6:34 pm

It's a MS Analyzis Services.

BR
Jacek

Post Reply