Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |