kpi_calculation bug