![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Newbie question: I'm trying to do some website traffic statistics.. Here's my mdx.. select nonemptycrossjoin (domain.[vch domain].members, source.[vch source].members) on rows, tail(time.week.members, 3) on columns from sessions I want to get a result like this domain source 2 Weeks Ago Last Week This Week total domain1 source1 10 20 25 55 domain1 source2 20 10 30 60 domain1 source3 50 50 100 200 domain1 total 80 80 155 315 domain2 source1 10 10 10 30 domain2 source2 15 15 15 45 domain2 total 25 25 25 75 . . grand total 1000 2000 3000 4000 What I'm missing is the totals on the extreme right, the rollup totals for each group and the grand totals. I've worked for years in t-sql and can do this in a snap there, but I'd like to learn how to do this in MDX.. Any help welcome. Ephraim.. |
#3
| |||
| |||
|
|
Perhaps all you need to to add the various All members to your sets (unless these are subsets). Sort of like this: SELECT nonemptycrossjoin ( {domain.defaultmember, domain.[vch domain].members}, {[vch source].defaultmember, [vch source].members) on rows etc... tom @ the domain below www.tomchester.net "Ephraim" <ephieb (AT) bruderhof (DOT) com> wrote in message news:Xns941759C24342Ewhateveritisnt (AT) 207 (DOT) 14.113.17... Newbie question: I'm trying to do some website traffic statistics.. Here's my mdx.. select nonemptycrossjoin (domain.[vch domain].members, source.[vch source].members) on rows, tail(time.week.members, 3) on columns from sessions I want to get a result like this domain source 2 Weeks Ago Last Week This Week total domain1 source1 10 20 25 55 domain1 source2 20 10 30 60 domain1 source3 50 50 100 200 domain1 total 80 80 155 315 domain2 source1 10 10 10 30 domain2 source2 15 15 15 45 domain2 total 25 25 25 75 . . grand total 1000 2000 3000 4000 What I'm missing is the totals on the extreme right, the rollup totals for each group and the grand totals. I've worked for years in t-sql and can do this in a snap there, but I'd like to learn how to do this in MDX.. Any help welcome. Ephraim.. |
![]() |
| Thread Tools | |
| Display Modes | |
| |