Hello,

in the foodmart database we want to get the product with the highest store cost. This can be realized by firing the following query:

Code:
with member [Measures].[max] as 'Max([Product].[Product Name].Members, [Measures].[Store Cost])'
select {[Measures].[max]} ON COLUMNS,
Filter([Product].[Product Name].Members, ([Measures].[Store Cost] = [Measures].[max])) ON ROWS
from [Sales]
where [Time].[1997]
But the calculating process is not efficient enough. In fact, the Max() function has already got the right tuple. What we need further is just the product name of this tuple. However, to the best of our knowledge, we have to invoke the Filter() function, which takes a lot of extra time.

Does anyone have an idea how to optimize this query, so that we don't need the Filter() function anymore?

Thanks in advance

Yu