Forum Discussion
matrix subtotal
- Anonymous1 year ago
Thanks for the reply from parry2k please allow me to provide another insight:
Hi, sraj
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.First create a calculation table:
Table2 = VAR _summarize = SUMMARIZE ( 'Table', [id], "Column1", "RETURN", "VALUE", CALCULATE ( SUM ( 'Table'[VALUE] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Column1] = "B" ) ) - CALCULATE ( SUM ( 'Table'[VALUE] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Column1] = "C" ) ) - CALCULATE ( SUM ( 'Table'[VALUE] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Column1] = "D" ) ) ) RETURN UNION ( 'Table', _summarize )3.Here's my final result, which I hope meets your requirements.
4.Here is the relevant documentation:
How to put the row and column subtotals in front o... - Microsoft Fabric Community
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from parry2k please allow me to provide another insight:
Hi, sraj
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.First create a calculation table:
Table2 =
VAR _summarize =
SUMMARIZE (
'Table',
[id],
"Column1", "RETURN",
"VALUE",
CALCULATE (
SUM ( 'Table'[VALUE] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Column1] = "B" )
)
- CALCULATE (
SUM ( 'Table'[VALUE] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Column1] = "C" )
)
- CALCULATE (
SUM ( 'Table'[VALUE] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Column1] = "D" )
)
)
RETURN
UNION ( 'Table', _summarize )
3.Here's my final result, which I hope meets your requirements.
4.Here is the relevant documentation:
How to put the row and column subtotals in front o... - Microsoft Fabric Community
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.