Forum Discussion
Column totals for matrix with specific layout
- 6 years ago
Hi, fpennisi17
Based on your description, I created data to reproduce your scenario.
Table:
You may create measures as below.
Measure1 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value1]), BLANK() ) Measure2 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value2]), IF( ISFILTERED('Table'[Level]), BLANK(), SUM('Table'[Value2]) ) ) Measure3 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value3]), BLANK() ) Measure4 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value4]), IF( ISFILTERED('Table'[Level]), BLANK(), SUM('Table'[Value4]) ) ) Measure5 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value5]), IF( ISFILTERED('Table'[Level]), BLANK(), SUM('Table'[Value5]) ) )Then you need to make the matrix selected, go to 'Visualizations' ribbon, click 'Format'=>'SubTotals', set 'Row subtotals' on.
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
fpennisi17 , Not very clear. Matrix does how Grand Total. Can you explain with an example or screenshot
Also refer: https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/
- fpennisi176 years agoHelper III
In this example I reproduced, in Excel, my matrix layout.
- v-alq-msft6 years agoCommunity Support
Hi, fpennisi17
Based on your description, I created data to reproduce your scenario.
Table:
You may create measures as below.
Measure1 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value1]), BLANK() ) Measure2 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value2]), IF( ISFILTERED('Table'[Level]), BLANK(), SUM('Table'[Value2]) ) ) Measure3 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value3]), BLANK() ) Measure4 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value4]), IF( ISFILTERED('Table'[Level]), BLANK(), SUM('Table'[Value4]) ) ) Measure5 = IF( ISINSCOPE('Table'[Field]), SUM('Table'[Value5]), IF( ISFILTERED('Table'[Level]), BLANK(), SUM('Table'[Value5]) ) )Then you need to make the matrix selected, go to 'Visualizations' ribbon, click 'Format'=>'SubTotals', set 'Row subtotals' on.
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- fpennisi176 years agoHelper III
It worked for the data.
I didn't want the intermediate subtotals, so I also unchecked them for first level of hierarchy, by enabling "per row level" option.
In this way, I had to apply the condition you suggest (if not in scope then blank) only in the measures for which I don't want the total.
By the way, one annoying thing remains. I don't know why, but albeit the totals take only the height of one row, the footer row is much higher (see screenshot)
How can I eliminate that space?