使用SSAS和MDX在列和行上显示不同的尺寸

| 嗨,我是SSAS和MDX的新手,我需要根据OLAP多维数据集生成一个ssrs报告。 我不知道如何在列和行上显示不同的维成员。 维度是列和客户端上的等级和时间,行上的状态是这样的:
              | a rated | b rated  | c rated | Year-3 | Year-2 | Year-1 | Year* | Total|
good clients  |
medium clients|
bad clients   |
total clients |
status 1      |
status 2      |
status 3      |
total status  |
----------------------------------------------------------------------------------------
年份对应于当前年份。 如何使用MDX做到这一点?     
已邀请:
在MDX中,如果要在同一轴上显示它们,可以将不同尺寸的成员放入元组。就像是:
select  ([Time].[Calendar].[Year], [Rate].[rating].children) on columns,
select  ( ... , ... ) on rows
from [cube]
可能有助于解决您的问题。     
MDX SELECT语句的轴是一组相同“维数”的元组。这意味着所有元组必须包含相同维度的成员。因此,您无法根据要求由不同尺寸的成员(成员是元组)构成MDX集。 话虽这么说,我不明白:“收视率和时间栏是独立的”。这到底是什么意思?     
一个MDX查询最多可以支持128个指定轴,但是很少有MDX查询使用5个以上的轴。对于前5个轴,可以改用别名COLUMNS,ROWS,PAGES,SECTIONS和CHAPTERS。 尝试使用上述轴来实现您期望的效果,例如查询两个不同的维度。     
以下查询可能适合您。您提到您的多维数据集中没有\“ all \”成员,因此您需要用各自的默认成员替换查询中的\“ all \”。我曾尝试在Adventure作品中制作类似的主题。单元具有Internet销售额
               | 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]
结果如下     

要回复问题请先登录注册