Это ваш сценарий. Есть много скобок, которые сигнализируют кортеж на Mondrian
:
WITH
MEMBER [Measures].[Top5] AS
RANK (
(
[Product].[Product Category].currentmember
,[Product].[Brand Name].CurrentMember
)
, ORDER(
(
[Product].[Product Category].currentmember
,[Product].[Brand Name].[Brand Name].Members
)
, [Measures].[Store Sales]
, BDESC
)
)
SELECT
non empty
(
[Product].[Product Category].[Product Category]
,filter(
[Product].[Brand Name].[Brand Name]
, [Measures].[Top5]<6
)
) on columns,
non empty (
[Yearly_Income].[Yearly Income],
[Measures].[Store Sales]
) on rows
from [projetDW];
Возможно, попробуйте использовать функцию CROSSJOIN
для создания ваших наборов кортежей:
WITH
MEMBER [Measures].[Top5] AS
RANK (
CROSSJOIN(
{ [Product].[Product Category].currentmember }
,{ [Product].[Brand Name].CurrentMember }
)
, ORDER(
CROSSJOIN(
{ [Product].[Product Category].currentmember }
,[Product].[Brand Name].[Brand Name].Members
)
, [Measures].[Store Sales]
, BDESC
)
)
SELECT
non empty
CROSSJOIN(
[Product].[Product Category].[Product Category].MEMBERS
,FILTER(
[Product].[Brand Name].[Brand Name]
, [Measures].[Top5]<6
)
) on columns,
non empty
(
[Yearly_Income].[Yearly Income],
[Measures].[Store Sales]
) on rows
from [projetDW];