问题描述
我正在尝试为MDX查询编写等效的DAX表达式,如下所述-
MDX查询就像-
我已经有一个名称为Measure1的计算量度,并且我正在尝试使用Measure1计算另一个量度(假设Measure2)
创建成员CurrentCube.[Measures].[Measure2]为
Sum([DimensionX].[X1].[X1],iif([Measures].[Measure1]> 100,1,null))
如何在DAX中复制相同内容?
我尝试过使用COUNTROWS函数之类的多种方法来至少获取行数,但是即使是基本结果也无法按预期生成.
在这方面的任何帮助将不胜感激.
提前谢谢,
Abhi8
Hi,
I am trying to write an equivalent DAX expression for a MDX query as mentioned below-
The MDX query goes like -
I already have a calculated measure with name Measure1 and I am trying to calculate another measure(suppose Measure2) using Measure1
Create Member CurrentCube.[Measures].[Measure2] as
Sum([DimensionX].[X1].[X1],iif([Measures].[Measure1] > 100,1,null))
How to replicate the same in DAX?
I have tried multiple methods like COUNTROWS function to get the no of rows at least, but even the basic result is not generating as expected.
Any help in this regard will be greatly appreciated.
Thanks in advance,
Abhi8
推荐答案
Measure2:=
SUMX(
VALUES('Dimension'[X1]),
IIF( [Measure1] > 100, 1, BLANK() )
)
在大多数情况下,性能应该不错.
Performance should be fine in most cases.
这篇关于如何在DAX中复制MDX Sum函数的行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!