![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----Original Message----- Does anyone know the fastest (best!) way to answer the following question: Give me all Customers who spent more than 2$ on Good Imported Beer AND more than 3$ on Good Light Beer? Here's my attempt: 'Filter(NonEmptyCrossjoin(Extract(Filter(NonEmptyC rossjoin ({[Customers]- .[Name].Members},{[Product].[Product Name].[Good Imported Beer]},2),([Measures].[Store Sales])>3),Customers), {[Product].[Product Name].[Good Light Beer]},2),([Measures].[Store Sales])>1)' -- Posted via http://dbforums.com . |
#3
| |||
| |||
|
|
You can define a named set with the required definition. a named set can then be queried just as you query a dimension. -----Original Message----- Does anyone know the fastest (best!) way to answer the following question: Give me all Customers who spent more than 2$ on Good Imported Beer AND more than 3$ on Good Light Beer? Here's my attempt: 'Filter(NonEmptyCrossjoin(Extract(Filter(NonEmptyC rossjoin ({[Customers]- .[Name].Members},{[Product].[Product Name].[Good Imported Beer]},2),([Measures].[Store Sales])>3),Customers), {[Product].[Product Name].[Good Light Beer]},2),([Measures].[Store Sales])>1)' -- Posted via http://dbforums.com/http://dbforums.com . |
#4
| |||
| |||
|
|
-----Original Message----- True .... That's a good idea but the query needs to be completely dynamic, i.e. give me all of the Customers who spent more (or less, or whatever) than N$ on product A AND more than X$ on product B .... etc. etc.... I just want to be sure that I'm doing queries of this type in the most efficient way possible. Originally posted by Gs You can define a named set with the required definition. a named set can then be queried just as you query a dimension. -----Original Message----- Does anyone know the fastest (best!) way to answer the following question: Give me all Customers who spent more than 2$ on Good Imported Beer AND more than 3$ on Good Light Beer? Here's my attempt: 'Filter(NonEmptyCrossjoin(Extract(Filter (NonEmptyCrossjoin ({[Customers]- .[Name].Members},{[Product].[Product Name].[Good Imported Beer]},2),([Measures].[Store Sales])>3),Customers), {[Product].[Product Name].[Good Light Beer]},2),([Measures].[Store Sales]) 1)' -- Posted via http://dbforums.com/http://dbforums.com . -- Posted via http://dbforums.com . |
![]() |
| Thread Tools | |
| Display Modes | |
| |