Запрос ниже может работать для вас. Вы упомянули, что в вашем кубе нет «всех» элементов, поэтому вам нужно заменить «все» в запросе соответствующими элементами по умолчанию. Я попытался сделать подобный senario в Приключенческих работах. Ячейки имеют количество интернет-продаж
| topSeller | Bottom Seller | 2011| 2012 |
Topcustomers |
Bottomcustomers|
North America |
Europe |
//create
//SET [Adventure Works].[TopCustomers] AS TopCount(([Customer].[Customer].Members,[Sales Territory].[Sales Territory Country].[All]), 3,[Measures].[Internet Sales Amount])
//SET [Adventure Works].[BottomCustomers] AS bottomCount(([Customer].[Customer].Members,[Sales Territory].[Sales Territory Country].[All]), 3,[Measures].[Internet Sales Amount])
//SET [Adventure Works].[NorthAmerica] AS ([Customer].[Customer].[All],{[Sales Territory].[Sales Territory Country].&[United States],[Sales Territory].[Sales Territory Country].&[Canada]})
//SET [Adventure Works].[Europe] AS ([Customer].[Customer].[All],{[Sales Territory].[Sales Territory Country].&[France],[Sales Territory].[Sales Territory Country].&[Germany],[Sales Territory].[Sales Territory Country].&[United Kingdom]})
//
//SET [Adventure Works].[TopSellers] AS TopCount(([Product].[Model Name].Members,[Date].[Calendar Year].[All]), 3,[Measures].[Internet Sales Amount])
//SET [Adventure Works].[BottomSellers] AS BottomCount(([Product].[Model Name].Members,[Date].[Calendar Year].[All]), 3,[Measures].[Internet Sales Amount])
//SET [Adventure Works].[2011] AS ([Product].[Model Name].[All],[Date].[Calendar Year].&[2011])
//SET [Adventure Works].[2012] AS ([Product].[Model Name].[All],[Date].[Calendar Year].&[2012])
//
select
{
([Measures].[Internet Sales Amount],[TopSellers]),
([Measures].[Internet Sales Amount],[BottomSellers]),
([Measures].[Internet Sales Amount],[2011]),
([Measures].[Internet Sales Amount],[2012])
}
on columns,
{
([TopCustomers]),
([BottomCustomers]),
([NorthAmerica]),
([Europe])
}
on rows
from [Adventure Works]
Результат выглядит ниже
![Result](https://i.stack.imgur.com/ZVUQM.jpg)