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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
JNcr
New Member

P&L statement with matrix - % of revenue

Hi, I have created a P&L statement using the matrix visual.  

I have one table containing the actual results and another table containing the P&L template.

In the matrix I would like to include a column with each line item as a % of total revenue, however the formula I use only works next to the total revenue line, see below.

 

BI.jpg

My formula is 

Actuals % = DIVIDE( [Actuals (£'000)] , [Total revenue (£'000)] , 0)
 
I know I need to override the filters in the table I just don't know how to do this.
 
The other relevant measures are as follows:
 
Actuals (£'000) =   VAR 
Actual = FILTER(Accounts, Accounts[Actual / budget] = "Actual")
RETURN
CALCULATE([Values £'000] , Actual)

 

Total revenue (£'000) = CALCULATE( [Actuals (£'000)] ,
FILTER(Accounts , Accounts[Source] = "Actual") , FILTER(Accounts , Accounts[Name] = "Revenue" ))

 

Values £'000 = ROUND( DIVIDE( SUM(Accounts[Values] ) , 1000 , 0) , 0)
 
 
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @JNcr 

You need to adjust the Total revenue (£'000) by ALL Function or ALLSELECTED Function as below:

 

Total revenue (£'000) = CALCULATE( [Actuals (£'000)] ,
FILTER(ALL(Accounts) , Accounts[Source] = "Actual") , FILTER(ALL(Accounts) , Accounts[Name] = "Revenue" ))

 

 

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

If not your case, please share your sample pbix file and expected output.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @JNcr 

You need to adjust the Total revenue (£'000) by ALL Function or ALLSELECTED Function as below:

 

Total revenue (£'000) = CALCULATE( [Actuals (£'000)] ,
FILTER(ALL(Accounts) , Accounts[Source] = "Actual") , FILTER(ALL(Accounts) , Accounts[Name] = "Revenue" ))

 

 

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

If not your case, please share your sample pbix file and expected output.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Lin, a great help

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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