Chicago1988
Chicago1988

Reputation: 684

dax fails in excel but not in power bi?

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!)

Upvotes: 1

Views: 103

Answers (1)

Peter
Peter

Reputation: 12315

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.

Upvotes: 2

Related Questions