Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Sum values from two columns in another table

Hi,

which formula calculate values in "calculated column" in table 1?

Tables has relationship based on column "id"

 

Thank you

  • Anonymous's avatar
    Anonymous
    3 years ago

    Thank you for good idea, I used nad creted faster sollution 

    column = CALCULATE( SUM(table2[A]) + SUM(table2[B]), Filter(table2, table1[id]=table2[id]))

4 Replies

  • Anonymous 

    pls try this

    Column = RELATED(Table2[A])+RELATED(Table2[B])
    • Anonymous's avatar
      Anonymous
      Not applicable

      thank you, and how to do same but with tables which have not relationship?

      • ryan_mayu's avatar
        ryan_mayu
        Icon for Super User rankSuper User

        Anonymous 

        you can try this

        Column = sumx(FILTER(Table2,'Table1'[id]=Table2[id]),'Table2'[A])+sumx(FILTER(Table2,'Table1'[id]=Table2[id]),'Table2'[B])