kpi fitting macro