Forum Discussion

tim_001's avatar
tim_001
Helper I
2 years ago
Solved

SUBTOTAL in Matrix Visual as Row

Hi, 

 

I am facing an issue calculating a subtotal column. I tried to use CALCULATE SUM with FILTER but it does not really work. 


Maybe somebody has a good idea? 🙂

 

Current Matrix Visual View: 

 202420252026
Apples41023
Bananas56743
Cucumber263
TOTAL118369

 

Trying to get this view with calculated row:

 202420252026
Apples41023
Bananas56743
SUBTOTAL FRUITS97766
Cucumber263
SUBTOTAL VEGETABLES263
TOTAL118369

 

Appreciate any ideas and feedback. 

 

Kind Regards

  • tim_001 You could get something like this if you add a column to identify Fruits and Vegetables in your table. Otherwise, you are looking at a disconnected table and a single measure that identifies the row it is in and returns the appropriate calculation.

  • tim_001's avatar
    tim_001
    2 years ago

    Hi Greg_Deckler  Thanks. So I would make another column that says if "Apple" then "Fruit" and so on. And then I can make a SUMIFS based on that column?

  • Hi, I added a column and used this formula: 

    If(containstring(columnname, "X"), "desired", "none")

     

    Now I just moved that in the first order of the matrix visual. So I have the Subtotal as one row and you can expend from there. I think this is the easiest way thanks. 

3 Replies

  • Hi, I added a column and used this formula: 

    If(containstring(columnname, "X"), "desired", "none")

     

    Now I just moved that in the first order of the matrix visual. So I have the Subtotal as one row and you can expend from there. I think this is the easiest way thanks. 

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    tim_001 You could get something like this if you add a column to identify Fruits and Vegetables in your table. Otherwise, you are looking at a disconnected table and a single measure that identifies the row it is in and returns the appropriate calculation.

    • tim_001's avatar
      tim_001
      Helper I

      Hi Greg_Deckler  Thanks. So I would make another column that says if "Apple" then "Fruit" and so on. And then I can make a SUMIFS based on that column?