Forum Discussion
Change single cell in matrix column subtotal
I have a matrix that looks somewhat like this,
accounts Q1 Q2 Q3 Q4 Full year
sales 120 140 120 150 530
OI 30 20 20 50 120
Return on Sale 25% 14% 16% 33% 22%
The 22% in return on sale is done because the matrix averages the 4 return on sales. the full year column is the column subtotal renamed to full year. i do not want the full year return on sale being calculated by averaging the 4 return on sales, rather, I want to have it be calculated by dividing full year OI by full year Sales. does anyone know how i would be able to change just that cell in a matrix to make it divide oi by sales rather than average it?
2 Replies
- amitchandak
Super User
Anonymous , Return on Sale should be measure like
If sales or IO are meausres
Return on Sale = Divide([Sales], [OI])
if the are values assuming you are using measure m1 = sum(Table[Value])
if(Max(Table[Account]) <> "Return on Sale", [M1], divide(calculate([M1], Table[Account] = "sales") ,calculate([M1], Table[Account] = "OI") ) )
I have replaced few account total here
Power BI How to get the P&L formatting right: https://youtu.be/C9K8uVfthUU
Power BI How to get two columns format Profit and Loss Statement(P&L) right: https://youtu.be/WLg85yiMgHI
https://medium.com/microsoft-power-bi/power-bi-formatted-p-l-with-custom-sub-totals-and-blank-rows-e39ca822908a- AnonymousNot applicable
How/where would i input these directions for it to apply