WITH MEMBER [Measures].[Country Count]
AS
Count(existing [Customer].[Customer Geography].[Country])
MEMBER [Customer].[Customer Geography].ClassA AS
SUM(filter([Customer].[Customer Geography].[Country],[Measures].[Internet Order Count] > 3000))
MEMBER [Customer].[Customer Geography].ClassB AS
SUM(filter([Customer].[Customer Geography].[Country],[Measures].[Internet Order Count] > 1500))
MEMBER [Customer].[Customer Geography].ClassC AS
SUM(filter([Customer].[Customer Geography].[Country],[Measures].[Internet Order Count] > 0))
SET My_Custom_Set AS
{[Customer].[Customer Geography].ClassA, [Customer].[Customer Geography].ClassB,[Customer].[Customer Geography].ClassC}
SELECT {[Measures].[Internet Order Count], [Measures].[Internet Sales Amount], [Measures].[Country Count]} ON COLUMNS,
My_Custom_Set ON ROWS
FROM
[Adventure Works]
结果:
在上面的查询中,如何获得有多少国家贡献了 A 类、B 类、C 类,这里对于任何类,最大国家计数 6 显示在度量“国家计数”中?
为什么 Here existing不提供当前班级的国家数量?