Forum Discussion

sebbyp's avatar
sebbyp
Helper III
8 years ago
Solved

Challenging Measure Calculation

Help Please on this challenging measure calculation.  I have two tables and i would like to create the column or measure for the 'Weighted Value' in Table 2.  The calculation is Table 2 Trade Partner...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi sebbyp,

     

    You can try to use below formual to get the weighted value(calculate column):

    Weighted Value =
    [Trade Partner Weight]
        * SUMX (
            FILTER (
                ALL ( Table1 ),
                Table1[Trade Partner] = EARLIER ( Table2[Trade Partner] )
                    && Table1[Date] = EARLIER ( Table2[Date] )
            ),
            Table1[Value]
        )
    

     

    Regards,

    Xiaoxin Sheng