我有一个有效的 MDX 语句,但我想扩展它。当前的语句带回了特定年份的前 10 名,其中行是州,列是总收入。我想生成 5 列——每列和行集代表不同的年份。我将如何实现这一目标?
with
member measures.[Total Earnings] as
(measures.[Total GS]) + (measures.[Total DE]) + (measures.[Total SE])
set [Top 10 States] as
topcount
(
{Stores.[State Code]. [State Code].members},
10,
(Measures.[Total Earnings], [Time].[C Year].[2011])
)
select
{([Measures].[Total Earnings])} on columns,
{[Top 10 States]} on rows
from LoyaltyMeasurements
Where (Time.[C Year].[2011]);