Forum Discussion

bedard's avatar
bedard
Frequent Visitor
4 years ago
Solved

multiplication from values in different tables

i need to multiplicate values of : FERT_TOT[N_FERT] to FIELDS_LIST[acrage]    problem is i can't just make [N_FERT] * [ACREAGE] since they aren't in the same table.    I can't use sum since i nee...
  • amitchandak's avatar
    4 years ago

    bedard , if you need multiple two columns from two table, they should first brought together on common level

     

    If these are joined tables

    Table2 is a master Table

    Sumx(Table1, Table1[N_FERT]* related([ACREAGE]) )

     

    Table 1 Is master table

     

    Sumx(Table2,related( Table1[N_FERT])* ([ACREAGE]) )

     

     

    else using a third common table

    Sumx(values(Table3[ID]),calculate( Sum( Table1[N_FERT])* Average([ACREAGE]) ) )

     

     

    refer 4 ways to copy data from one table to another
    https://www.youtube.com/watch?v=Wu1mWxR23jU
    https://www.youtube.com/watch?v=czNHt7UXIe8