Totals for each category of a data element


I have a data element with one category combination. The category combination contains two different categories.

I am designing a custom data entry form and this data element is represented in a table. In this table one category is disaggregated in the rows, the other one in the columns.

There is a final “total” row and a total column and I want to sum up the rows and columns here.

However, under “totals” in the custom form designer, I only have the overall total of both categories.

I want to sum up this data element for each category.

I saw here a workaround:

which would be to make “total indicator” but this seems inconvenient. It would be as cumbersome as making several data elements.

Is there no feature to sum up data elements per category?