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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you ...

Status
Not open for further replies.

VBXL

Programmer
Jul 10, 2001
198
GB
Write this to work in a MDX Query

Select a,b from ExampleTable where
a = 'XXXX'


a = Rows
b = Columns


Cheers

VBXL

 
hi....

in MDX the "where" statement works differently than it does in SQL.

to write in MDX using your example above I'm going to have to modify your example a bit.
assume u have a "State" field and a "Tools" field in your table and your tracking how many tools were sold.

here r 2 examples:
1.
this retrieves all measures being counted in all states

select measures.members on columns,
state.members on rows
from CubeName

2.
this will tell u all hammers sold in the state of kentucky
select {[Tools].[Hammer]} on columns,
{[State].[Kentucky]} on rows
From CubeName

hope this helped,
Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top