Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can you merge to mdx queries? 1

Status
Not open for further replies.

jeffmoore64

Programmer
Mar 23, 2005
207
0
0
US
Hi,
I have two queries that I want to merge to create a an output that looks something like this:


mycount Store Sales
Q1 1 $139,628.35
Q2 2 $132,666.27
Q3 3 $140,271.89
etc..

Each of these querys runs just fine by it's self using the foodmart2000 sample cube.

This generates the column "mycount":
Code:
WITH
   MEMBER [Measures].[mycount] AS 
   '1'

SELECT
   { [Measures].[mycount]} ON COLUMNS,
   { [Time].[quarter].members } ON ROWS
FROM Sales

cell properties CELL_ORDINAL

And this generates the column "store sales":

Code:
SELECT
   {  [Measures].[Store Sales] } ON COLUMNS,
   { [Time].[quarter].members } ON ROWS
FROM Sales

Any help out there...
Thanks
Jeff

PS this relates to my last post... but got no response on
 
Adding your second measure to the select list should do it. you just have to remember that your members must be on the same axis.

Code:
WITH
   MEMBER [Measures].[mycount] AS 
   '1'

SELECT
   { [Measures].[mycount], [Measures].[Store Sales]} ON COLUMNS,
   { [Time].[quarter].members } ON ROWS
FROM Sales

cell properties CELL_ORDINAL

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top