Forum Discussion
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
- amitchandakSuper User
Ayappan , You need to have some join condition to bring that value in table B
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 - v-chenwuz-msftCommunity Support
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.