dax fails in excel but not in power bi?

Viewed 38

Whenever I consume my model from excel, if I put the next measure it crashes:

IF

(

NOT [Measure1] < 0,

DIVIDE ( [Measure2], [Measure1])
)

Why is this happening?

(it works fine in power bi desktop!)

1 Answers

DAX in Excel and Power BI are not exactly the same. 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(<numerator>, <denominator> [,<alternateresult>])  

But in your case it rather looks like one of the undisclosed mesures are causing the problem.

Related