Solved

Production Order Labor Efficiency > Add overall average to footer?

  • 12 December 2022
  • 6 replies
  • 63 views

Userlevel 4
Badge

Has anyone ever added the overall average to the footer of this report? I’ve tinkered with it but haven’t gotten it to work and was hoping someone else has already accomplished this and could share their report version. Thanks!

icon

Best answer by BenjaminCrisman 16 December 2022, 19:07

View original

6 replies

Userlevel 7
Badge +4

Hi @hayleehicks18! It doesn’t look like the image or what you are linking is showing up, can you try again?

Userlevel 4
Badge

Hi @BenjaminCrisman! I didn’t include a link. The standard report is AM653000, and I haven’t gotten far enough with it to have anything to share. I was hoping someone has added an overall average to the footer and could share how they were able to do it.

Here’s a screenshot of the report from the demo system. I am looking to grab the averages from each section and then put an overall average at the end of the report.

 

Userlevel 7
Badge +4

Hi @hayleehicks18! This is a little tricky because one part of the variable’s expression calculating the average can result in a 0 on a the denominator, causing the NaN to show.

For me I broke out the expression for Total Efficiency into three lines:

 

So the result is 1/0, which can’t happen obviously.

So to get around this you’ll need to adjust this expression so it will never return a 0, then the NaN will stop coming in.

After that you can add the Report Footer section and create a new variable $TotalAverage like:

=$TotalAverage+( $TotalEfficiency/$TotalOperations):

Then display it in the Report Footer:

This should keep a running total now of the averages, as long as none of them are NaN.

Next you’ll need to add another variable to the header where the Production Order shows:

This way you have a count of how many production orders are in the report, then you can divide the $TotalAverage variable by the $Line variable to get the average for all the showing orders:

This is how I did it, but the MFG module isn’t really my expertise, so I don’t know the best expression to stop the denominator from appearing as 0 (I just replaced it with 1 in my tests).

Let me know if this helps

Userlevel 4
Badge

Hi @BenjaminCrisman! Thanks for the info! That is very helpful. Do you mind dropping the rpx file, so I can take a look and follow along with what was updated on it?

Userlevel 7
Badge +4

I’ve attached it, it’s not complete, but it’s close I think

Userlevel 4
Badge

This is as close as I could get it. It mostly works for what we’re needing! Still the occasional null value. Attaching here for others to use if interested.

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 — 2024  Acumatica, Inc. All rights reserved