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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Tihannah
Resolver I
Resolver I

Dax to calculate % of Revenue

I've looked all over, but can't seem to find a solution for this. I'm working on Financial statements and need to get a % of Total Revenue for each sub category. The way my data is laid out I had to create a measure that filters for Actuals and Budget:

Actuals

 CALCULATE(SUM('Financials'[Amt]),FILTER('Financials','Financials'[Type_Cd] = "Act"))

Budget

 CALCULATE(SUM('Financials'[Amt]),FILTER('Financials','Financials'[Type_Cd] = "Bud"))
 
My accounts are set up the same way as a financial statement
Accounts.PNG
 
I can easily just drop my Actual and Budget columns in again and select %ofTotal, which works fine, but to save real estate, I am creating "Budget"/ "Prior Year" buttons to toggle between for comparison vs Actual. So I need to create a dax that calculates % of Total Revenue for each account. Every example I've come across uses just a simple SUM(Sales[Sales]) type example, which doesn't work for the DAX I've had to create above to get these amounts. I feel like it shouldn't be this complicated, but I just keep hitting a wall with this. Any help is appreciated!

 

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

P&Ls in Power BI are quite challenging. I have comprehensive coverage at my website

here https://exceleratorbi.com.au/build-a-pl-with-power-bi/

and

here https://exceleratorbi.com.au/building-a-pl-in-power-bi-part-2-percentages/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

3 REPLIES 3
MattAllington
Community Champion
Community Champion

P&Ls in Power BI are quite challenging. I have comprehensive coverage at my website

here https://exceleratorbi.com.au/build-a-pl-with-power-bi/

and

here https://exceleratorbi.com.au/building-a-pl-in-power-bi-part-2-percentages/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

This was EXTREMELY helpful and helped me tackle several other things. Thank you!!

Great. I'm glad it helped. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

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

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.