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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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