如何在DAX中复制MDX Sum函数的行为

编程入门 行业动态 更新时间:2024-10-24 14:24:13
本文介绍了如何在DAX中复制MDX Sum函数的行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试为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函数的行为

本文发布于:2023-10-30 19:33:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1543793.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   如何在   MDX   DAX   Sum

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!