Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
12 | |
9 | |
8 |
User | Count |
---|---|
17 | |
10 | |
8 | |
8 | |
7 |