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.
Good day everyone,
this is my first post, and I thank you in advance for the time you will dedicate to help me understand my issue.
I have the need to compare inventories from 2 different systems called SeaCare (SC) and CrunchTime (CT). Each inventory table contains items which do repeat, since they are result of appending inventory tables from the different storage locations (Vessels). This happens for both SC and CT tables.
Here attached you will find, the tables I have so far:
on the left you can see Medication List and Supply List tables. These are obtained for every storage location (Vessel) and, after appending them, the SeaCare_FULL_Inventory table is created.
on the right side you can see the Costa and Aida tables, which contain inventory tables from CT. They are also appended to create the CT_FULL_Inventory table.
so, being the SeaCare_FULL_Inventory and the CT_FULL_Inventory the result of all other reports, I'd need to compare these two.
In the particular:
Obviously there's something I am missing here.
I hope my explanation was good enough, please let me know in case of questions.
thanks all!
Solved! Go to Solution.
Hi @stefano86
Add a table with the Unique products. You can make it preferably in Power Query, but for the simplicity and to make it easier to test here it is in DAX:
Unique_SKU_Table =
DISTINCT(
UNION(
SELECTCOLUMNS(
SeaCare_FULL_Inventory,
"Unique SKU", [Unique SKU],
"Vessel", [VESSEL],
"Product Name", [NAME],
"Category", [CATEGORY]
),
SELECTCOLUMNS(
CT_FULL_Inventory,
"Unique SKU", [Unique SKU],
"Vessel", [Vessel],
"Product Name", [Product Name],
"Category", [CATEGORY]
)
)
)
Then create metrics on this new table, to calculate the quantity on each related table.
Total_SeaCare_Quantity =
CALCULATE(
SUM(SeaCare_FULL_Inventory[QUANTITY]),
RELATEDTABLE(Unique_SKU_Table)
)
Total_CrunchTime_Quantity =
CALCULATE(
SUM(CT_FULL_Inventory[Total Quantity]),
RELATEDTABLE(Unique_SKU_Table)
)
Pedro Reis - Data Platform MVP / MCT
Making Power BI and Fabric Simple
If my response resolved your issue, please mark it as a solution to help others find it. If you found it helpful, please consider giving it a kudos. Your feedback is highly appreciated!
Find me at LinkedIn
Hi @stefano86 ,
Thanks for reaching out to our community.
Have you tried using Merge Queries in Power Query?
Here're the steps:
Choose the SeaCare_FULL_Inventory table as the first table and the CT_FULL_Inventory table as the second table.
Merge the tables on the Unique SKU field. Then you can expand the column with tables. Add a custom column with [Total Quantity] - [Quantity].
Hope it helps.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @stefano86
Add a table with the Unique products. You can make it preferably in Power Query, but for the simplicity and to make it easier to test here it is in DAX:
Unique_SKU_Table =
DISTINCT(
UNION(
SELECTCOLUMNS(
SeaCare_FULL_Inventory,
"Unique SKU", [Unique SKU],
"Vessel", [VESSEL],
"Product Name", [NAME],
"Category", [CATEGORY]
),
SELECTCOLUMNS(
CT_FULL_Inventory,
"Unique SKU", [Unique SKU],
"Vessel", [Vessel],
"Product Name", [Product Name],
"Category", [CATEGORY]
)
)
)
Then create metrics on this new table, to calculate the quantity on each related table.
Total_SeaCare_Quantity =
CALCULATE(
SUM(SeaCare_FULL_Inventory[QUANTITY]),
RELATEDTABLE(Unique_SKU_Table)
)
Total_CrunchTime_Quantity =
CALCULATE(
SUM(CT_FULL_Inventory[Total Quantity]),
RELATEDTABLE(Unique_SKU_Table)
)
Pedro Reis - Data Platform MVP / MCT
Making Power BI and Fabric Simple
If my response resolved your issue, please mark it as a solution to help others find it. If you found it helpful, please consider giving it a kudos. Your feedback is highly appreciated!
Find me at LinkedIn
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 | |
8 | |
8 |
User | Count |
---|---|
17 | |
10 | |
8 | |
7 | |
7 |