Getting the Total price of a Work Order based on the Work Order Details Table

I’m try to obtain the Total price of a Work order in the Work Orders Table based on the price of each Row in the Work Orders Details Table for the matching work order.

I have virtual column type = List in the Work Orders Table with the following formula = REF_ROWS(“WO Items”, “Work Order ID”) and I have a Total Price column in the Work Orders Table with the following formula = SUM (SELECT (WO Items[Total], [Work Order ID] = [_THISROW].[Work Order ID]))

I have two work orders with each with unique key in the table WO1 and WO2, and the issue I have is that the SUM is returning the total price for both work orders details instead of one total price for work order W01 and another for work order W02.

Here are the data tables

Here are the column definitions

Solved Solved
0 5 865
1 ACCEPTED SOLUTION

Steve,

I just figured it out the formula should be SUM (SELECT (WO Items[Total], [Work Order ID] = [WO ID])), it works fine now.

Thank you for your help. Happy Labor Day.

View solution in original post

5 REPLIES 5
Top Labels in this Space