Forum Discussion
How to have both Subtotal AND Total Row in Matrix Table (whilst hiding some rows)
- 1 year ago
Hi derekli1700
Here's the closest I could get to this visual appearance using a Matrix visual.
Sample PBIX is attached.
1. Add a Dummy table with a single column and single row, containing an arbitrary value. In my example it is a table with column
Dummy[Dummy]with single value"Dummy".2. Create a Matrix visual with
Dummy[Dummy]andSales[Category]on rows, plus your measures in Values.3. Set the Layout Preset to Tabular.
4. Turn off Wrap text in Column Headers and Row Headers.
5. Turn off +/- buttons for Row Headers.
6. Create a calculation group with a single calculation item with this expression:
IF ( ISINSCOPE ( Dummy[Dummy] ), SELECTEDMEASURE (), CALCULATE ( SELECTEDMEASURE(), REMOVEFILTERS ( Sales[Category] ) ) )7. Apply this calculation item as a filter to the matrix.
8. Reduce the width of the
Dummycolumn so that it is invisible.9. Change the Row subtotal label for
Categoryto "Subtotal":10. Filter Category as required.
Is that the sort of thing you were looking for?
Hi derekli1700
Here's the closest I could get to this visual appearance using a Matrix visual.
Sample PBIX is attached.
1. Add a Dummy table with a single column and single row, containing an arbitrary value. In my example it is a table with column Dummy[Dummy] with single value "Dummy".
2. Create a Matrix visual with Dummy[Dummy] and Sales[Category] on rows, plus your measures in Values.
3. Set the Layout Preset to Tabular.
4. Turn off Wrap text in Column Headers and Row Headers.
5. Turn off +/- buttons for Row Headers.
6. Create a calculation group with a single calculation item with this expression:
IF (
ISINSCOPE ( Dummy[Dummy] ),
SELECTEDMEASURE (),
CALCULATE ( SELECTEDMEASURE(), REMOVEFILTERS ( Sales[Category] ) )
)
7. Apply this calculation item as a filter to the matrix.
8. Reduce the width of the Dummy column so that it is invisible.
9. Change the Row subtotal label for Category to "Subtotal":
10. Filter Category as required.
Is that the sort of thing you were looking for?