changed kpi calculation method

Switched logic to be based on hard-coded formulas instead of dynamic
sql.  It will just be easier in the long-run to do it this way for our
purposes.