This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi!
I am trying to add a calculated row to a profit & loss statement matrix visual
(very simplified in this post)
This is what I have:
This is what I want:
Here Tax is calculated as 25% of "Total before tax"
And these are my tables and relations:
Does this has an easy solution? (one that I don't see....)
Thanks!
Børre
Solved! Go to Solution.
hi, @bzjens
For your requirement, you could try this way as below:
Step1:
Add a row for Tax in Accounts table as below:
Step2:
Add a measure by this logic
Measure =
VAR _table =
SUMMARIZE (
Accounts,
Accounts[category],
Accounts[subcategory],
"a", IF (
SELECTEDVALUE ( Accounts[category] ) = "Total before Tax",
CALCULATE ( SUM ( Transactions[Value] ), ALLSELECTED ( Accounts ) ) * 0.25,
CALCULATE ( SUM ( Transactions[Value] ) )
)
)
RETURN
IF (
HASONEVALUE ( Accounts[category] ),
IF (
SELECTEDVALUE ( Accounts[category] ) = "Total before Tax",
CALCULATE ( SUM ( Transactions[Value] ), ALLSELECTED ( Accounts ) ) * 0.25,
CALCULATE ( SUM ( Transactions[Value] ) )
),
SUMX ( _table, [a] )
)
Then use this measure in matrix visual.
Result:
and here is sample pbix file, please try it.
Regards,
Lin
hi, @bzjens
For your requirement, you could try this way as below:
Step1:
Add a row for Tax in Accounts table as below:
Step2:
Add a measure by this logic
Measure =
VAR _table =
SUMMARIZE (
Accounts,
Accounts[category],
Accounts[subcategory],
"a", IF (
SELECTEDVALUE ( Accounts[category] ) = "Total before Tax",
CALCULATE ( SUM ( Transactions[Value] ), ALLSELECTED ( Accounts ) ) * 0.25,
CALCULATE ( SUM ( Transactions[Value] ) )
)
)
RETURN
IF (
HASONEVALUE ( Accounts[category] ),
IF (
SELECTEDVALUE ( Accounts[category] ) = "Total before Tax",
CALCULATE ( SUM ( Transactions[Value] ), ALLSELECTED ( Accounts ) ) * 0.25,
CALCULATE ( SUM ( Transactions[Value] ) )
),
SUMX ( _table, [a] )
)
Then use this measure in matrix visual.
Result:
and here is sample pbix file, please try it.
Regards,
Lin
Nice! Thanks! This pointed me in the right direction.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 25 | |
| 22 | |
| 22 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 43 | |
| 41 | |
| 39 | |
| 21 | |
| 19 |