Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
I have below 2 tables-SO and SO_lines
I want the output table as such that the new table should only contain those SO that are in SO table and the quantity column should be the the sum of only quantities of those items that are in SO table. I do not want the items that do not belong to SO table.
| Table SO | ||
| JobID | ||
| A | ||
| B | ||
| C | ||
| D | ||
| Table SO_lines | ||
| JobID | Item | Quantity |
| A | 123 | 40 |
| A | 456 | 100 |
| A | 789 | 45 |
| A | 321 | 23 |
| B | 123 | 54 |
| B | 456 | 54 |
| B | 765 | 32 |
| C | 123 | 12 |
| C | 321 | 54 |
| C | 456 | 23 |
| D | 987 | 87 |
| D | 123 | 122 |
| E | 123 | 43 |
| F | 456 | 23 |
OUtput-items and quantites of only those who are in SO table-
| Output Table | |
| item | Quantity |
| 123 | 228 |
| 456 | 177 |
| 789 | 45 |
| 321 | 77 |
| 765 | 32 |
| 987 | 87 |
Solved! Go to Solution.
Assuming your relatioship is like this
Create a table as
Add filter
Your output will be
Hi,
You may download my PBI file from here.
Hope this helps.
Assuming your relatioship is like this
Create a table as
Add filter
Your output will be
For Power Query,
a) Using Merge Queries - inner join type
a) 1) Check this link https://docs.microsoft.com/en-us/power-query/merge-queries-inner
a) 2) As per the link, your right table for merge is "Table SO"
a) 3) Join Kind is Inner Join
a) 4) You dont need to expand for any right table columns
a) 5) remove unwanted columns
b) Select the column "item" , click group by Quantity
https://docs.microsoft.com/en-us/power-query/group-by
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 18 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 61 | |
| 53 | |
| 47 | |
| 40 | |
| 38 |