Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
This is the output I expect in the matrix; I try to insert a row called index, its category b/a, and this index how many b times of a, please help. Thank you.
Solved! Go to Solution.
Hi @austinli37dot8 ,
I think you can custom row subtotal by measure to show index as you want.
You can transform your table as below.
Measure:
Custom Total =
VAR _VALUE =
SUM ( 'Table'[Value] )
VAR _a =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[category] = "a" )
VAR _b =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[category] = "b" )
VAR _INDEX =
DIVIDE ( _b, _a )
RETURN
IF ( HASONEVALUE ( 'Table'[category] ), _VALUE, _INDEX )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @austinli37dot8 ,
I think you can custom row subtotal by measure to show index as you want.
You can transform your table as below.
Measure:
Custom Total =
VAR _VALUE =
SUM ( 'Table'[Value] )
VAR _a =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[category] = "a" )
VAR _b =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[category] = "b" )
VAR _INDEX =
DIVIDE ( _b, _a )
RETURN
IF ( HASONEVALUE ( 'Table'[category] ), _VALUE, _INDEX )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@austinli37dot8 , refer if this way of adding custom total can help
Power BI How to get the P&L formatting right: https://youtu.be/C9K8uVfthUU
Power BI How to get two columns format Profit and Loss Statement(P&L) right: https://youtu.be/WLg85yiMgHI
User | Count |
---|---|
51 | |
36 | |
20 | |
14 | |
13 |
User | Count |
---|---|
94 | |
72 | |
30 | |
21 | |
13 |