Question

Inquiry formula issue? - Margin

  • 23 July 2021
  • 3 replies
  • 31 views

Badge

I have set the formula to count the margin, I’m not sure is the formula correct?

=([Products.CuryUnitPrice]-[Products.curyUnitCost])/[Products.CuryUnitPrice]

does someone know how to solve this problem?

After I set the formula, it come out the error. “Divide by Zero error encountered”.

 

 


3 replies

Userlevel 2
Badge

Hi, I might not use the same DAC as you but you can see the logic that works below:

 

Userlevel 6
Badge +9

Hi @pandachan48 Please try with the below formula.

 

=[Products.CuryUnitPrice] - IIF( [Products.CuryUnitPrice] >0  , [Products.CuryUnitCost]/[Products.CuryUnitPrice],  0  )

 

 

Userlevel 4
Badge +1

It would be cool if Acumatica could add a DIVIDE function like they have in Power BI. It’s pretty simple, but it’s much easier to use because it can sense a divide by zero and return a blank result or return an alternate result if you populate the 3rd argument as shown in the screenshot below.

 

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved