Subtotals depending on columns

Hi,

I want to create subtotals calculated depending on the user selection - based on 4 columns.

Any idea how I can achieve that?

Exemple:

Level1 Level 2 Level 3 Sum

A abc. abc.de 1000

I want a subtotal Level 1 - if user has selected Level 1, Subtotal for each row with Level 2(if user selects level 2) and so on.

Thank you

Did you try table(report) in visualization?