Forum Discussion
michalintive
9 years agoRegular Visitor
Power BI subscrating Matrix view.
Hi all, I need to create a new column with resoult of subsctracting two columns in Matrix view. I've tried to do it by guides in this community but I wasnt able to do it. I need to do cal...
- 9 years ago
You may refer to the following measures.
Revenue = CALCULATE ( SUM ( Table1[Value] ), Table1[Cost_Center_2] = "Revenue" )
Costs = CALCULATE ( SUM ( Table1[Value] ), Table1[Cost_Center_2] = "B Project Costs" )
X = [Revenue] - [Costs]
Percent = DIVIDE ( [X], [Revenue] )
michalintive
9 years agoRegular Visitor
Is there any possibility to make budget as you wrote but adding a criteria?
For example I need to calculate it in the way
Revenue = SUM(Table1[Value]) & Filter(Table1[Cost_Center_2]='Revenue')
Costs = Sum(Table1[Value] & Filter(Table1[Cost_Center_2]='B Project Costs') ?
Guy which projected this database puted all values in one column revenue and costs.
Anonymous
9 years agoNot applicable
Sure, no problem.
Example based on this table:
Result:
Code:
Revenue = CALCULATE( SUM(Table1[Value]); FILTER( Table1; Table1[Category]="Revenue" ) ) Costs = CALCULATE( SUM(Table1[Value]); FILTER( Table1; Table1[Category]="Costs" ) )