MP-Web General Calculator Recalculation

How to recalculate the General Calculator in MP-Web

Testing

Before saving a calculation to apply to future data and recalculating any historical data, it can be practical to test the logic using the Test Run. The Test Run option enables users to insert example values for each input and check if the functions output the expected values. This allows the option to make amendments before updating records within the system. 

The above example tests the volume vs the total allowable pond volume as a percentage. Users can manipulate the values in the Value column to test the expected output. 

Recalculating on Save

When a calculation is Saved, users are prompted to check whether they wish to apply it to existing data. 

Future calculations are triggered based on the importation of data. However, users may wish to run the calculation against this historical data if there is existing data in the database. If so, choose to Recalculate. 

Users can choose the date range of the data to calculate and then select either all or a subselect of the Sample Points contained in the calculation. Once the user clicks on Recalculate, the records affected will be marked for inclusion in the next calculator run. Therefore, results may not be instantaneous; however, they should be completed within 30 minutes at most. 

Troubleshooting

Rerunning the calculator multiple times will unlikely resolve problems with data not outputting as expected. 

  • Data - First, check that the input data is present against the Variable(s) the calculation expects, along with the appropriate Data Source, Sample Type, and Date Range. 
  • Interpolation and Filtering—Check that the Interpolation is set up as required. If the data does not have the matching date/time, the calculation may not run. Equally, check if the calculation is set to skip if no data is found for part of the expected logic. 
  • Physical Data - In most cases, physically entered data will block the calculation. In these cases, an alternative Data Source is likely to be needed to ensure the output data is unique.  
  • Inactive - If a calculation is not running at all, first check that the Active check box is ticked. If not, turn it on. To do so, you may need to resolve the calculation's syntax to enable this. 
  • Ordering - If a calculation follows on from the output of another check to ensure they are in the correct order. The input into calculation B, from calculation A, must be performed before calculation B is run. If the data is calculated manually when the calculation is rerun but does not on import of data, then this is typically the problem.