首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >mdx:使用mdx将行合并为单行

mdx:使用mdx将行合并为单行
EN

Stack Overflow用户
提问于 2013-12-17 21:32:46
回答 1查看 106关注 0票数 1

从附加的屏幕截图中,我们如何使用mdx查询将这5行分组到单个行中,而不使用第二列?

预期为单行,其中GD、FR、PR、NC和NT值为4

代码语言:javascript
复制
WITH
MEMBER Gd as iif([DimMetricNumeratorFrequency].[Label].currentmember is  [DimMetricNumeratorFrequency].   
[Label].&[GD],
[Measures].[Patient Key Distinct Count], null)
MEMBER fr as iif([DimMetricNumeratorFrequency].[Label].currentmember is  [DimMetricNumeratorFrequency]. 
[Label].&[FR],
[Measures].[Patient Key Distinct Count], null)
MEMBER pr as iif([DimMetricNumeratorFrequency].[Label].currentmember is  [DimMetricNumeratorFrequency].
[Label].&[PR],
[Measures].[Patient Key Distinct Count], null)
MEMBER nt as iif([DimMetricNumeratorFrequency].[Label].currentmember is  [DimMetricNumeratorFrequency].
[Label].&[NT],
[Measures].[Patient Key Distinct Count], null)
MEMBER nc as iif([DimMetricNumeratorFrequency].[Label].currentmember is  [DimMetricNumeratorFrequency].
[Label].&[NC],
[Measures].[Patient Key Distinct Count], null)


select {Gd, fr, pr, nt, nc} on 0,
([DimMetricNumeratorFrequency].[Metric Id].[Metric Id],[DimMetricNumeratorFrequency].[Label].  
[Label])      
on  1
from [StrategyCompanionDWCube]
EN

回答 1

Stack Overflow用户

发布于 2013-12-18 01:42:15

你为什么不简单地说

代码语言:javascript
复制
select [DimMetricNumeratorFrequency].[Label].[Label]
       on 0,
       { [Measures].[Patient Key Distinct Count] }    
       on  1
from [StrategyCompanionDWCube]

MDX不要求度量值在列上。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20635546

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档