简体   繁体   English

SSAS驱动的数据透视表上的总计

[英]Grand total on a SSAS driven pivot table

We are using a 我们正在使用 SASS 萨斯 SSAS driven pilot table where we would like to add a calculated measure using the sum of a column. SSAS驱动的试点表,我们希望在其中使用一列总和添加计算出的度量。 We don't know in advance which filters the users will be using, the measure is valid for any of them, so we just tried adding a calc measure on the excel file such as 我们事先不知道用户将使用哪个过滤器,该度量对他们中的任何一个都有效,因此我们只是尝试在excel文件中添加一个calc度量,例如

[Measures].[Sales]/sum(axis(1),[Measures].[Sales])

But it doesn't seem to work. 但这似乎不起作用。 So just to test we started with a plain 所以为了测试,我们从一个普通的开始

sum(axis(1),[Measures].[Sales])

which gives some astonishing result. 这给出了一些惊人的结果。 We cannot figure out what the result is adding up! 我们无法弄清楚结果的总和! Applying some filters and a detailed row, we get exactly twice the expected value (!!??). 应用一些过滤器和一个详细的行,我们得到的值正好是预期值的两倍(!! ??)。 Applying exactly the same filters and filtering also the rows, we get a value that we are not able to guess where it comes from. 应用完全相同的过滤器并对行进行过滤,我们将获得一个无法猜测其来源的值。

Any idea about what MDX should we use? 关于我们应该使用哪种MDX的任何想法?

Edited to clarify: We want to add the calculated measure on an Excel pivot table, not on the SSAS olap cube definition. 编辑以澄清:我们想将计算的度量添加到Excel数据透视表上,而不是SSAS olap多维数据集定义上。

I obviously was having a bad day. 我显然过得很糟糕。 One cannot think excel-like to solve an mdx issue. 人们无法想到像excel一样解决mdx问题。

A simple 一个简单的

([MyDim].[MyHierarchy].currentmember.parent,[Measures].[Sales])

is the right syntax to use in our calculus as the "parent total". 是在微积分中用作“父总计”的正确语法。

Thks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM