简体   繁体   English

dax 在 excel 中失败但在 power bi 中没有?

[英]dax fails in excel but not in power bi?

Whenever I consume my model from excel, if I put the next measure it crashes:每当我从 excel 消耗我的 model 时,如果我进行下一个测量,它就会崩溃:

IF

(

NOT [Measure1] < 0,

DIVIDE ( [Measure2], [Measure1])
)

Why is this happening?为什么会这样?

(it works fine in power bi desktop!) (它在 power bi 桌面上运行良好!)

DAX in Excel and Power BI are not exactly the same. Excel中的DAX和Power BI不完全一样。 However, your expression is clumsy, as DIVIDE takes care of any division by zero itself and returns BLANK() or an alternate result in case.但是,您的表达式很笨拙,因为 DIVIDE 会自行处理任何被零除并返回 BLANK() 或其他结果的情况。

DIVIDE(<numerator>, <denominator> [,<alternateresult>])  

But in your case it rather looks like one of the undisclosed mesures are causing the problem.但在你的情况下,它看起来像是一个未公开的措施导致了问题。

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

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