idafx / IDA-Framework

Intelligence Data Analytics Framework
http://ida2.krimnet.com
11 stars 3 forks source link

error in calculation of group total for negative item #25

Closed rajaiskandar closed 14 years ago

rajaiskandar commented 14 years ago

there is an error in the calculation of the gross national product should be consumption + investment + change in stocks + exports - imports + net factor payment

item import already marked as negative

but group total consider the item as positive (therefore doubling by that amount)

http://eids.treasury.gov.my/report/actual/year/116/detail

rajaiskandar commented 14 years ago

found an issue that there were double records in the database table data_year. deleted the double record, then went to data entry, changed the amount to zero, recalculate totals, then entered as positive amount, recalculate totals.

towfx commented 14 years ago

the are several issues regarding data calculation.

we need Data Cleaning Module for Administration

Data Cleaning Utility shall be able:

  1. Remove all duplicates - to check duplicate rows and marking for deletion
  2. Update parent_id's in data_year: item_parent_id, geography_parent_id, entity_parent_id - - - needed if item/geography/entity parent_id has been changed. The change also need to relate in data_year also, other wise total (group by parent_id) will failed.
  3. Recalculate all item total in batch.
  4. Recalculate all geography/entities in batch.
  5. Recalculate all formula in batch (may be triggered by cron too)
rajaiskandar commented 14 years ago

initial issue resolved