Forum Discussion
Summarized ColumnTable adding a Column to this table from another Summarised Table.
Good Afternoon,
I Have Table 1 which is a summarised version of a larger fact table.. Has Year, Fin Month, Various Columns and a Value.
I Have a 2nd Table, which too is a summarised table of a larger fact table. Also Has Year, Fin Month and 1 Value.
I would like to Add Table2's Value Column, to Table 1.
| First Table | |||
| Fin Year | Fin Month | Column 1 | Value |
| 2022 | 1 | Uk | 200 |
| 2022 | 1 | Us | 300 |
| 2022 | 1 | Eur | 100 |
| 2022 | 2 | UK | 400 |
| 2022 | 3 | UK | 250 |
| Second Table | ||
| Fin Year | Fin Month | Value |
| 2022 | 1 | 30000 |
| 2022 | 2 | 40000 |
| 2022 | 3 | 50000 |
End result required
| New Table | ||||
| Fin Year | Fin Month | Column 1 | Value | 2nd table Value |
| 2022 | 1 | Uk | 200 | 30000 |
| 2022 | 1 | Us | 300 | 30000 |
| 2022 | 1 | Eur | 100 | 30000 |
| 2022 | 2 | UK | 400 | 40000 |
| 2022 | 3 | UK | 250 | 50000 |
I will be Combining Year and Fin Month to get a singular ID Field to get a relationship... Just Cannot seem to get the required Output...
Any help will be most appreciated.
Regards Mike.
Anonymous , You can create a new in a column in power query or dax
[Year]*100 +[Month]
In both table.
Post that you can merge in power query
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
InDAX, you can use innerjoin , Crossjoin/filter to create a new table
Or simply join the table and use addcolumns to create a new table
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
Or copy column
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
- amitchandakSuper User
Anonymous , You can create a new in a column in power query or dax
[Year]*100 +[Month]
In both table.
Post that you can merge in power query
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
InDAX, you can use innerjoin , Crossjoin/filter to create a new table
Or simply join the table and use addcolumns to create a new table
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
Or copy column
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