Forum Discussion

jeffs9876's avatar
jeffs9876
New Member
9 years ago
Solved

Merge two tables while summing values from subtable

Hello, I have two tables   Table A is the Payment Table Payment ID Payment Amount Payment Date 1 10 1/1/17 2 10 1/2/17 3 10 1/3/17 4 10 1/4/17 5 10 1/5/17 6 10 1...
  • v-ljerr-msft's avatar
    9 years ago

    Hi jeffs9876,

     

    According to your description above, adding a calculate column in Payment Table should be a better choice than merging the two tables in your scenario. :smileyhappy:

     

    1. Create a relationships between the Payment table and Refund table with the Payment ID column if there isn't yet.

     

     

    2. Then you should be able to use the formula below to add a new calculate column in Payment table to get the total refunds for each payment from the Refund Table.

    Refund Amount = CALCULATE(SUM(Refund[Refund Amount])) + 0

     

    Regards