Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am a newbie to Power BI. I imported two separate data sources, one with sales data and one with open orders data. I would like to join these two data sources to be able to view open orders data in realtion to the sales data.
In a database environment I would join the two tables using the primary keys (Division, Year, Month, BU, PG, Cust no & Item no) to see the Qty, Amount, Cost, Qty_on_order & Value on the same row.
Can this be done in Power Query or is it a better solution to create the query in my database environment and import the query result to Power BI?
Sales data table
| Division | Year | Month | BU | PG | Cust no | Item no | Qty | Amount | Cost |
| 100 | 2025 | 1 | 30 | 200 | 1234 | ABC | 10 | 100 | 50 |
| 100 | 2025 | 1 | 31 | 300 | 9999 | ABC | 10 | 100 | 50 |
| 200 | 2025 | 2 | 30 | 100 | 1234 | XYZ | 5 | 200 | 150 |
Open Orders table
| Division | Year | Month | BU | PG | Cust no | Item no | Qty_on_order | Value |
| 100 | 2025 | 1 | 30 | 200 | 1234 | ABC | 100 | 5000 |
| 200 | 2025 | 2 | 30 | 100 | 1234 | XYZ | 10 | 1500 |
Result table after joining above tables
| Division | Year | Month | BU | PG | Cust no | Item no | Qty | Amount | Cost | Qty_on_order | Value |
| 100 | 2025 | 1 | 30 | 200 | 1234 | ABC | 10 | 100 | 50 | 100 | 5000 |
| 100 | 2025 | 1 | 31 | 300 | 9999 | ABC | 10 | 100 | 50 | ||
| 200 | 2025 | 2 | 30 | 100 | 1234 | XYZ | 5 | 200 | 150 | 10 | 1500 |
Kind regards,
-M.
Solved! Go to Solution.
It is possible, this is how to achieve that
While merging the tables directly will work, it's not the most optimal approach for a well-performing Power BI model. Ideally, you should restructure your data into fact and dimension tables. If that's not immediately possible, consider creating a single combined key column from your join fields in both tables. For better performance during the join, aim to represent this combined key as a number if feasible, rather than text.
Hi @martinnilsson ,
Thank you for reaching out to Microsoft Fabric Community.
You can achieve the join of your sales data and open orders data within Power Query. Here's some steps to achieve it:
Please go through the attached files for your reference.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Rama U.
Hi @martinnilsson ,
Thank you for reaching out to Microsoft Fabric Community.
You can achieve the join of your sales data and open orders data within Power Query. Here's some steps to achieve it:
Please go through the attached files for your reference.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Rama U.
It is possible, this is how to achieve that
While merging the tables directly will work, it's not the most optimal approach for a well-performing Power BI model. Ideally, you should restructure your data into fact and dimension tables. If that's not immediately possible, consider creating a single combined key column from your join fields in both tables. For better performance during the join, aim to represent this combined key as a number if feasible, rather than text.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |