I am trying to run the following Calculation using PowerQuery in PowerBi:
"Service1 Revenue"*"Service1 Rating" + "Service2 Revenue"*"Service2 Rating" + ...
The data comes from these two tables:
╭───╥────────────┬─────────────╮
│ 1 ║ Service │ Revenue │
╞═══╬════════════╪═════════════╡
│ A ║ Service 1 │ 10 │
│ B ║ Service 2 │ 100 │
│ C ║ etc | etc │
└───╨────────────┴─────────────┘
╭───╥────────────┬─────────────╮
│ 2 ║ Service │ Rating │
╞═══╬════════════╪═════════════╡
│ A ║ Service 1 │ 1 │
│ B ║ Service 2 │ 5 │
│ C ║ etc | etc │
└───╨────────────┴─────────────┘
I cannot figure out how to write the looping to perform the calculation per service and then sum all the results up.
In excel I guess a vba loop would have worked but not sure how to do that here.