Forum Discussion

dapperscavenger's avatar
5 years ago
Solved

Help with a formula - multiplying across two tables

Hi all   I am trying to work out how to write this forumla.  I feel like it's actually really simple and my brain is just not working today   I have two tables:   Table 1 contains Product code, ...
  • amitchandak's avatar
    amitchandak
    5 years ago

    dapperscavenger , Try measure likes

    calculate( maxx(filter(Table1, table1[Product code] = max(table2[Product code]) ),Sum(Table[Quantity])) * max(table2[% split]) ,values(Table2[Product]),values(Table2[Country]))

    or


    sumx(summarize( Table2, Table2[Product],Table2[Country],"_1", maxx(filter(Table1, table1[Product code] = max(table2[Product code]) ),Sum(Table[Quantity])) ,"_2",max(table2[% split])), [_1]*[_2])