Reputation: 902
Within my model I need to calculate a measure based on two related tables. The schema would be something like this:
On the table A I need to calculate a new metric called Bonus (Revenue*%bonus).
I'm kind of new with this tool, and I have seen a possible solution but so sure to understand it properly. What should I do, create the metric on the dashboard or in PowerBi?
I would appreciate any help.
Regards,
Upvotes: 2
Views: 10772
Reputation: 40204
If you have a relationship between Table A and Table B on the Contract_type
column, then you can create the Bonus
calculated column simply as
Bonus = TableA[Revenue] * RELATED( TableB[%bonus] )
If you need this as a measure, then put it inside a SUMX
:
Bonus = SUMX ( TableA, TableA[Revenue] * RELATED( TableB[%bonus] ) )
Upvotes: 5