Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I'm new to data modeling with Power Query so please forgive if this is rudimentary stuff. But I need some guidance.
I have 2 tables.
Table 1 has products and sales.
Table 2 has products and returns.
Table 1 has products = A, B, C
Table 2 has products = B, C, D
For products B and C, I want to show sales and returns.
For the other unique products, I want to show which do not match (i.e. A only has sales and D only has returns).
I have been doing this by appending the spreadsheets, then pivot and use the Nulls as the exceptions. But this is not sustaible anymore.
What is the best way to model this? A many-to-many join? Or a product lookup table of some sort?
What happens with the products also have categories?
Thanks for your help.
Solved! Go to Solution.
How about you append the 2 tables, but instead of pivoting the data, simple create a new column called "type". This new column will have the value "sales" or "returns". To do this, load both tables into power query one at a time. Add the new column for each table and hard code the correct value. Then append both tables.
Assuming you then load this data to power pivot, you can then use a pivot table or measures to complete the process. This shape is preferable for power pivot anyway.
How about you append the 2 tables, but instead of pivoting the data, simple create a new column called "type". This new column will have the value "sales" or "returns". To do this, load both tables into power query one at a time. Add the new column for each table and hard code the correct value. Then append both tables.
Assuming you then load this data to power pivot, you can then use a pivot table or measures to complete the process. This shape is preferable for power pivot anyway.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |