Forum Discussion

Ayappan's avatar
Ayappan
Helper III
4 years ago
Solved

Create new column based fields from different tables

Hi ,

     I want to create a column with the feilds in 2 different tables 

     Example  : TableA [column1,column2]

                       TableB [column3,column4]

So new column in TableA as column5  = ( (TableA [column1] + TableB [column3]  ) /  ( TableA [column2] + TableB [column4]) )

 

Thanks 

  • Hi   Ayappan ,  

    Maybe you should create relationships between these tables base on primary column like date or ID. If you just want plus them directly, you can add index column in power query editor. 

    (assume primary column is [index] ) 

     

    Then use below expression to get column5 in tableA. 

    Column5 =
    DIVIDE (
    [column1] + RELATED ( TableB[column3] ),
    [column2] + RELATED ( TableB[column4] )
    )
     

    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies