| The query below returns the median value for the Sale Amount measure across all members of the Fiscal Year level in the Fiscal hierarchy of the Date dimension.
|
| |
WITH MEMBER [Measures].[MedValue] AS MEDIAN([Date].[Fiscal].[Fiscal Year].Members, [Measures].[Sales Amount]), FORMAT_STRING="Currency"
SELECT {[Measures].[Sales Amount],[Measures].[MedValue]} ON COLUMNS,
{[Date].[Fiscal].[Fiscal Year].Members} ON ROWS
FROM [Adventure Works] |
| |
| |
| |
|
| |
|
| The following query uses the Median function to return the median value of the List Price for each Product Subcategory.
|
| |
WITH
MEMBER [Measures].[MedValue] AS MEDIAN([Product].[Product Categories].CurrentMember.Children, [Product].[Product].Properties("List Price"))
SELECT {[Measures].[MedValue]} ON COLUMNS,
{[Product].[Product Categories].[Subcategory].Members} ON ROWS
FROM [Adventure Works] |
| |
| |
| |
|
| |
|