Quantcast
Channel: SQL.ru: OLAP и DWH
Viewing all articles
Browse latest Browse all 1167

SSAS 2012. MDX. Элементы, по которым происходит Aggregate

$
0
0
Привет все.

Есть запрос
[CSV][/CSV]
WITH
  SET [AC] as {[Customer].[Country].&[Australia], [Customer].[Country].&[Canada]}
  SET [FG] as {[Customer].[Country].&[France], [Customer].[Country].&[Germany]}
  MEMBER [Customer].[Country].[AC] as Aggregate([AC]) 
  MEMBER [Customer].[Country].[FG] as Aggregate([FG]) 
  MEMBER [Список городов] as 
  GENERATE(EXISTS(EXISTING [Customer].[Country].[Country], ([Measures].[Internet Sales Amount])), [Customer].[Country].CurrentMember.Name,  ',')
SELECT 
  {[Список городов], [Measures].[Internet Sales Amount], [Measures].[Customer Count]} ON 0,
  {[Customer].[Country].[AC], [Customer].[Country].[FG]} ON 1 
FROM [Adventure Works]


Результат
Список городовInternet Sales AmountCustomer Count
ACAustralia+Canada+France+Germany+United Kingdom+United States11 038 845.455 162
FGAustralia+Canada+France+Germany+United Kingdom+United States5 538 330.053 590


Можно ли, и как, получить следующий результат
Список городовInternet Sales AmountCustomer Count
ACAustralia+Canada11 038 845.455 162
FGFrance+Germany5 538 330.053 590


Спасибо.

Viewing all articles
Browse latest Browse all 1167

Trending Articles