Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
violet11_6
Frequent Visitor

Percentage of Revenue

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 NameValueTotal Revenue
Revenue1,0001,000
Cost of Sales4001,000
SG&A3001,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:

YearCurrencyEntityAccountNameValue
   Revenue 
   Cost of Sales 
   SG&A 


However, I get the following results instead. The TotalRevenue does not appear against every account line.

Account NameValueTotal Revenue
Revenue1,0001,000
Cost of Sales400 
SG&A300 


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.

1 ACCEPTED SOLUTION

Hi,

 

Thank you. I managed to solve it with the ALL filter. I suppose I was pulling data from the incorrect database.

Thanks

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@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"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.