Forum Discussion
kgshooter
3 years agoRegular Visitor
Joining/Merging Tables Based on Column Value
I'm trying to merge data from two tables either into the one of the tables or create a new merged table if I need to. I've looked and looked and don't know how to make this happen. It seems like a relatively easy concept but I'm very new to Power BI. Thanks for any help anyone can provide.
| Table: Data | |
| Lane | Period |
| A | P01 |
| A | P01 |
| A | P02 |
| B | P01 |
| B | P02 |
| C | P01 |
| Table: Baseline | ||
| Lane | P01 | P02 |
| A | 5 | 7 |
| B | 3 | 2 |
| C | 1 | 4 |
| Desired outcome | ||
| Lane | Period | Baseline |
| A | P01 | 5 |
| A | P01 | 5 |
| A | P02 | 7 |
| B | P01 | 3 |
| B | P02 | 2 |
| C | P01 | 1 |
kgshooter See the attached PBIX file. You unpivot your Baseline P01, P02 columns, rename Attribute column to Period and then you can merge that table into Data using both Lane and Period columns.
1 Reply
- Greg_DecklerCommunity Champion
kgshooter See the attached PBIX file. You unpivot your Baseline P01, P02 columns, rename Attribute column to Period and then you can merge that table into Data using both Lane and Period columns.