Forum Discussion

jasmin_w's avatar
jasmin_w
Frequent Visitor
2 years ago
Solved

Calculated Column - SUM values in another table based on IDs equal to each other

I am trying to create a calculated column based on the SUM of values in another table where the IDs match each other.    I have 2 tables:  Sales Roster - contains one row per Employee Revenue - ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi jasmin_w ,

    I create two tables as you mentioned.

    Then I create two calculated columns and get what you want.

    Column = 
    SUMX ( FILTER ( 'T2', 'T2'[Peiod] = 'T1'[Peiod] ), 'T2'[Amount] )

    Column 2 = 
    SUMX ( FILTER ( 'T1', 'T1'[Peiod] <= EARLIER ( T1[Peiod] ) ), 'T1'[Column] )

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.