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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Matrix - changing total and dividing two rows

Hi 

 

I've got a matrix P&L , with the first line being our volumes. I'm looking to calculate CPL : dividing the volumes line with our COGS line in the matrix. 

 

Also is there a way to remove the total? As the total includes the volumes which shouldn't be included as my total P&L number

 

Thanks in advance!

P&L Matrix.PNG

 

1 ACCEPTED SOLUTION
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

 

To calculate CPL you can create a new calculated measure. 

The formula could look like this:

 

CPL = CALCULATE(
   SUM(Table[Values]),
   Table[P&L] = "Volumes"
) /
CALCULATE(
   SUM(Table[Values]),
   Table[P&L] = "COGS"
)

For removing the Total, you can turn it off in the visualization format:

 

Totals Off.png

 

Let me know if this answers your questions

 

Regards,

 

LC

Interested in Power BI templates? Check out my blog at www.finance-bi.com

 

View solution in original post

1 REPLY 1
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

 

To calculate CPL you can create a new calculated measure. 

The formula could look like this:

 

CPL = CALCULATE(
   SUM(Table[Values]),
   Table[P&L] = "Volumes"
) /
CALCULATE(
   SUM(Table[Values]),
   Table[P&L] = "COGS"
)

For removing the Total, you can turn it off in the visualization format:

 

Totals Off.png

 

Let me know if this answers your questions

 

Regards,

 

LC

Interested in Power BI templates? Check out my blog at www.finance-bi.com

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors