我不确定如何表达,但是尝试使用 MDX 对度量值求和。
我的 MDX 如下:
select {[CompanyDimension].[Foo],
[CompanyDimension].[Bar],
[CompanyDimension].[CDK]} on columns,
TopCount([${SLRDimension}].Children,
10,
[Measures].[ProjectCountMeasure]) on rows
from [Foo_Cube]
where ([FAreaDimension].[Admin])
对于这个表达式,我得到以下输出:
+----------------------------------------------------------------------+
| | CompanyDimension.NameHierarchy |
+----------------------------------------------------------------------+
| SLRDimension | Foo | Bar | CDK
+----------------------------------------------------------------------+
| Development | 1 | 1 | 6
| Testing | | | 3
| Implementation | | 1 | 5
| Reports | 1 | | 4
| Planning | 1 | | 5
| Reporting | | | 1
| Coding | | | 2
| Performance | | | 1
| Designed | | 1 |
| Designing | | | 2
+----------------------------------------------------------------------+
现在我想得到每行值的总和。例如,在第一行中Development
,我希望其对应的值7
不是 3 个值,即 1、1、6
我是 MDX 世界的新手,所以我不知道该怎么做。请帮忙 !
我想要的最终值如下:
+----------------------------------------------------------------------+
| | CompanyDimension.NameHierarchy |
+----------------------------------------------------------------------+
| SLRDimension | Sum
+----------------------------------------------------------------------+
| Development | 7
| Testing | 3
| Implementation | 6
| Reports | 5
| Planning | 6
| Reporting | 1
| Coding | 2
| Performance | 1
| Designed | 1
| Designing | 2
+----------------------------------------------------------------------+