dbTalk Databases Forums  

Return a CrossJoin on tuples with like dimensions

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Return a CrossJoin on tuples with like dimensions in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Shiangoli via SQLMonster.com
 
Posts: n/a

Default Return a CrossJoin on tuples with like dimensions - 11-17-2004 , 09:24 AM






Please may i have your assistance with creating the following format result set

Date1 Date2 ......
Bytes Utilisation Bytes Utilisation .......

Server1 2345 0.3 2378 0.4
Server2 2376 0.1 2983 0.03
Server3 2387 0.2 2768 0.7

I can create the above by explicitly stating the date's as shown in my script below (example 1/5/2004) however I would like to acheive this by providing a date range as I defined in the set , perhaps using a crossjoin or other means.
I've experimented with crossjoin and using .members with no success and any ideas would much appreciated.
Ultimately I will need to add additional columns under each date however if I can get round the above perhaps the method will be generic for further columns.
Bytes is a member in the measures dimension whilst utilisation is a calculated member in the measures dimension as shown below

with
/*
define our set 'top servers' (top 10) for the month 1/7/2004 based on their volume (bytes) */ set [TOP SERVERS] as 'TopCount([Server].[Device Name].Members, 10,( [Measures].[bytes], [time].[m].[01/07/2004]))'

/*
define our reporting time period
*/
set [REPORT TIME] as
'[time].[m].[01/05/2004]:[time].[m].[01/10/2004]'
/*
define a calculated member to return the utilisation over all the servers for the above date.
*/
member [measures].[utilisation] as
'([Measures].[bytes])/([Measures].[bytes],[Server].[All Server])'

select
--******I would like to replace this*************** {([time].[m].[01/05/2004],[measures].[bytes]),([time].[m].[01/05/2004],[measures].[utilisation])}
ON COLUMNS,
{[TOP SERVERS]} ON ROWS
FROM NVServer
where ([device Group].[All device Group])




Thanks

John

*****************************************
* This message was posted via http://www.sqlmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.sqlmonster.com/Uwe/Abuse....3caccca268d5c9
*****************************************

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.