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 need the total of N FERT per FIELDS and not per sum i tried a few things that were asked in the forum but can't find a way to make it work. The relationships shouldn't be a problem. 

 

I also tried to take a shortcut by creating tables to get the data in the same table but it wasn't succesful 

 

thanks 

  • 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

1 Reply

  • 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