title: Month to year Aggregation in plsql
body: <p>I have a fact table where I have each kpi name, value for the kpi and the month it belongs to. I need to do the aggregation from the month level to year level. For rolling up from month to year, I will use the confirmed dimension table (time dimension) to get to know the year for each month. </p>
  
  <p>The challenge which I am facing is, I should not always do sum(kpi value) when I roll up from month to year. It will be avg, min or max depends on the kpi type. This I will get to know kpi dimension table where it has kpi name and kpi aggregation type.</p>
  
  <p>I would require a help how I can  do this rolling up for all kpi with respect to its aggregation type. </p>