In our example, we're displaying the name of the member in the slicer.
Query
with
member [Measures].[Slicer] as Generate( slicer() as yy, yy.currentMember(0).name, " - " )
select
{ [Measures].[Slicer], [Measures].[Amount] } on 0,
[Geography].[Geo].[Country].members on 1
from [Sales]
where { [Time].[Calendar].[2010], [Time].[Calendar].[2011] }
Result
|
Slicer |
Amount |
Canada |
2010 - 2011 |
|
Mexico |
2010 - 2011 |
|
United States |
2010 - 2011 |
768 |
Venezuela |
2010 - 2011 |
|
France |
2010 - 2011 |
4 |
Spain |
2010 - 2011 |
3 |
Switzerland |
2010 - 2011 |
248 |
Assertion : MDX Equals
with
member [Measures].[Slicer] as "2010 - 2011"
select
{ [Measures].[Slicer], [Measures].[Amount] } on 0,
[Geography].[Geo].[Country].members on 1
from [Sales]
where { [Time].[Calendar].[2010], [Time].[Calendar].[2011] }