Forum Discussion

Marco_88's avatar
Marco_88
Helper I
2 years ago
Solved

combine and iterate data

Hello everyone,   I’m Marco and I need your help. I’m quite new with PBI and I think this problem is easy for you. I have 2 xls sheets called “Database” and “WP”. In each sheet I have a columns ca...
  • johnbasha33's avatar
    2 years ago

    Marco_88 

    Sure, Marco! You can achieve this by performing a merge operation in Power BI to combine the two tables based on the `JA_Code` column. Here are the steps to follow:

    ### Steps to Merge Tables in Power BI

    1. **Load Data into Power BI:**
    - Open Power BI Desktop.
    - Go to `Home` -> `Get Data` -> `Excel`.
    - Select your Excel file and import the `Database` and `WP` sheets.

    2. **Open Power Query Editor:**
    - Once the data is loaded, click on `Transform Data` to open the Power Query Editor.

    3. **Merge Queries:**
    - In the Power Query Editor, go to `Home` -> `Merge Queries` -> `Merge Queries as New`.
    - In the `Merge` dialog, select the `Database` table as the first table and the `WP` table as the second table.
    - Select the `JA_Code` column in both tables as the key column to match.
    - Choose the `Inner Join` type to get only the matching rows.

    4. **Expand Merged Columns:**
    - After the merge, you will see a new column in the resulting table with a table icon.
    - Click on the expand icon (two arrows pointing outwards) in the new column header.
    - Select the columns you want to include from the `Database` table and click `OK`.

    5. **Load the Data:**
    - Once you have expanded the columns and have the desired structure, click `Close & Load` to load the data back into Power BI.

    Following these steps, you should be able to create a new table in Power BI that matches the desired result you provided.

    If you need further assistance or have additional questions, feel free to ask!

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!