Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

MDX Query filtering on two different dimensions using 'OR' operator

$
0
0
I need help with a simple MDX query.Suppose I have a measure group linked to a fact table called Flights, which records air traffic information.There are some attributes in that fact table:[b]FactFlights[/b]DestinationCityArrivalCityFlightTime (how many minutes to get from Destination to Arrival)...Then I have two cube dimensions, one linked to DestinationCity, and one linked to ArrivalCity.[b]DimDestinationCityDimArrivalCity[/b]Those dimensions have a couple of attributes, including City, with memebers like 'Seattle', 'New York', 'Los Angeles', etc.I need to write an MDX query that returns data from the FactFlights measure gropu where a city appears in EITHER the DestinationCity OR the ArrivalCity.In TSQL this would be trivial.Something like:SELECT DestinationCity, ArrivalCity, FlightTimeFROM FlightsWHERE DestinationCity = 'Seattle' OR ArrivalCity = 'Seattle'Any help/guidance would be greatly appreciated.Thanks!

Viewing all articles
Browse latest Browse all 1341

Trending Articles