Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
Any kind soul there who could help me? I am trying to get TotalRevenue to appear on every PnL account on my PnL Statement as follows:
| Account Name | Value | Total Revenue |
| Revenue | 1,000 | 1,000 |
| Cost of Sales | 400 | 1,000 |
| SG&A | 300 | 1,000 |
I have used the following formula:
TtlRevenue =
VAR Revenue = CALCULATE(SUM('PnL Database'[Value], Filter('PnLDatabase','PnL Database'[AccountName]="Revenue"))
RETURN CALCULATE(Revenue, ALL('PnL Database'[AccountName]))
and my table looks like this:
| Year | Currency | Entity | AccountName | Value |
| Revenue | ||||
| Cost of Sales | ||||
| SG&A |
However, I get the following results instead. The TotalRevenue does not appear against every account line.
| Account Name | Value | Total Revenue |
| Revenue | 1,000 | 1,000 |
| Cost of Sales | 400 | |
| SG&A | 300 |
My ultimate aim, as you can guess, is to work out the AccountNameValue as a Percentage of my TotalRevenue.
Any advice? Thanks in advance for your help.
Solved! Go to Solution.
Hi,
Thank you. I managed to solve it with the ALL filter. I suppose I was pulling data from the incorrect database.
Thanks
@violet11_6 , Try like
CALCULATE(SUM('PnL Database'[Value], 'PnL Database'[AccountName]="Revenue")
or
CALCULATE(SUM('PnL Database'[Value], Filter(allselected('PnLDatabase'),'PnL Database'[AccountName]="Revenue"))
Hi,
Thank you. I managed to solve it with the ALL filter. I suppose I was pulling data from the incorrect database.
Thanks
Can you share the updated DAX expression? I have this same problem
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 53 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 26 |