Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mellerbeck
Creator II
Creator II

Help with Margin % expression, problem with division by zero?

I have two rows of data, Customer, Product, Cost & inputfields of New Price and New Volume

The Bid Sales is calculated by New Price * New Volume

The Bid Cost is Cost/LB * New Volume

The Margin $ Is Bid Sales - Bid Cost

And the Margin % is Margin $ / Bid Sales

This appears to work but when I put in values for the first product for the first New Price and New Volume the total for the Margin % shows 10% when I would expect it to be 50%, matching the single row of data's margin.

margin.PNG

4 Replies
Not applicable

Hi mellerbeck,

Please, change your "Bid Cost" Expression:

sum(CurrentCostPerLB * NewVolume)

Let me know, if this change was helpful for you

Regards,

Ricardo

mellerbeck
Creator II
Creator II
Author

I tried similar things to that, but that isn't quite it. I have to use sum(CurrentCostPerLB * Column(3)) but that still doesn't do the trick?

Not applicable

Check my release. It works.

mellerbeck
Creator II
Creator II
Author

Ahh! I see now, thank you! I was trying to use the [New Volume] calculated for the column, instead of going straight to the data that is in the NewVolume...  at least that is how I see it! Anyways, yes it works!