Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Protect agains Dividing by 0

I have an expression in a graph,

sum({<Date*={">=$(StartDate) <=$(EndDate)"}>} MetricOne)

/

sum({<Date*={">=$(StartDate) <=$(EndDate)"}>} MetricTwo)



This is supposed to divide metricone by Metric two. If MetricTwo is 0 I want the expression to just be 0. How can I do this?

Thanks!

Tags (1)
1 Reply
boorgura
Valued Contributor

Protect agains Dividing by 0

cant you just use if(Metric2 = 0, 0, Metric1/Metric2) ?

That should be a straight one. Not sure if you are constrained by something else.

Community Browser