Subtotals: How to model

Hi all,

I have a question about modeling subtotals. Our tables include totals and subtotals, for example:

  • ISCED 0 = ISCED 01 + 02
  • ISCED 2 = ISCED 24 + 25
  • “Males and females” and “Total” rows across sex and type of institution

These totals must be stored as data values, because historical data and some country reports include totals with no breakdown.

Options we’re considering:

  1. Separate data elements for totals, with validation rules checking that each total equals the sum of its parts.
  2. “Total” options inside the categories, kept out of analytics totals using category option groups.

Questions:

  • Which approach has worked for you without double counting in analytics?
  • Can a section form show totals and detail in one grid, or is a custom form needed?
  • Are there existing packages that handle this, such as DATIM or WHO?

Thanks!

Hi Duraid,

I would go with separate data elements for the totals plus validation rules. A “Total” option inside the category will double count in any pivot that aggregates over it, and category option groups only help if every user applies them every time.

Set the missing value strategy on the rules so a country that reports only the total doesn’t get flagged when the parts are empty. For analytics, use an indicator or predictor that takes the sum of the parts where they exist and falls back to the stored total where they don’t.

A section form can show computed totals on screen but they aren’t stored, so entering real totals in the same grid as the detail usually needs a custom form. Putting the total elements in their own section is a lighter option.

As far as I know DATIM and WHO packages store the finest disaggregation and derive totals, so I’m not aware of a package that covers totals with no breakdown.

Hope that helps

Thank you for your response. Much appreciated.