10 Replies Latest reply on Apr 26, 2017 10:05 AM by Selim Mejia

# Dividing Two Measures in a Calculated Field

Hello Experts,

Real simple: I am trying to divide two measures in a calculated field but not getting the desired answer. I tried SUM() for Numerator and Denominator as well but no luck. Can some one please help. Thanks in advance.

 Quantity= 37,873 Sales= \$2,297,201 Answer= \$0.02

but instead of 0.02 I am getting 1,387 (See image below)

Calculation1 =

• ###### 1. Re: Dividing Two Measures in a Calculated Field

Change Calculation1 to be SUM([Quantity])/SUM([Sales])

• ###### 3. Re: Dividing Two Measures in a Calculated Field

Can you show the result you get from that formula?

• ###### 5. Re: Dividing Two Measures in a Calculated Field

Andrew: This is what I see when I add SUM() to the calculation, above picture. Any other ideas?

• ###### 6. Re: Dividing Two Measures in a Calculated Field

Yes, you wouldn't sum this, it is already summed. Drag it off the view, ensure the formula is changed and double click the measure to put it back on the view.

Sent from Samsung Mobile

• ###### 7. Re: Dividing Two Measures in a Calculated Field

After you make changes in your calculated filed "calculation1" i.e. sum(quantity) / sum ( sales ) , remove the earlier field that is showing error in red and re drop the new calculated field on worksheet. You may also have to format the value else you will see 0 ( instead of 0.02 ) , so you will have to go to format and allow 2 decimal values to see 0.02 .

Also please mark the question as answered if your issue is resolved so that the question does not remain open and others people time is not wasted revisiting a solved problem.

• ###### 8. Re: Dividing Two Measures in a Calculated Field

Thanks a lot, it worked!

• ###### 9. Re: Dividing Two Measures in a Calculated Field

Akriti, thankyou so much for the response. I wanted to mark yours as correct answer as well but I can only mark one, so I liked your answer. Really appreciate your help!

• ###### 10. Re: Dividing Two Measures in a Calculated Field

tnx

fixed the issue for me too