Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

njreardo
New Contributor III

Order of operations is off/producing wrong result

I'm doing (a - b) / b but it's giving me the wrong result. Am I writing it correctly? I want to do a - b first and then divide it by b. Ex (Sum([field 1]) - Sum ([field 2])) / Sum([field 2])

Tags (2)
3 Replies
pathiqvd
Contributor III

Re: Order of operations is off/producing wrong result

Hi Nicholas,

  Your expression Is correct. Please share your full expression.

(Sum(A)-Sum(B))

/

Sum(B)

Regards,

Re: Order of operations is off/producing wrong result

It seems right but try this ways

=( Sum ( [field 1]   -  [field 2] ) )  / Sum ( [field 2] )

Regards

Anand

vipingarg23
Contributor

Re: Order of operations is off/producing wrong result

Expression is fine. Please share your data if you can.