Forum Discussion
Anonymous
5 years agoNot applicable
Comparing two excel sheets without merging
Hello, I'm dealing with two warehouses that use different systems for item tracking. I receive weekly reports from each warehouse, and I just need to set up a dashboard that shows the differences...
- 5 years ago
You have to filter out the rows containing "in transit":
try:
Table differences = VAR receiving1 = SUMMARIZE ( Receiving, Receiving[ItemID], Receiving[Description], Receiving[Item Type], "QT", SUM ( Receiving[Quantity]) ) VAR sending1 = SUMMARIZE ( FILTER( Sending, Sending[Status] <> "In transit"), Sending[ItemID], Sending[Description], Sending[Item Type], "QT", SUM ( Sending[Quantity (all)] ) ) VAR OnlyRec = ADDCOLUMNS ( EXCEPT ( receiving1, sending1 ), "From table", "Receiving" ) VAR OnlySend = ADDCOLUMNS ( EXCEPT ( sending1, receiving1 ), "From table", "Sending" ) RETURN UNION ( OnlyRec, OnlySend )
PaulDBrown
5 years agoCommunity Champion
You could create a new table to identify the rows which are not in the other table using something along the lines of:
Table differences =
VAR receiving1 =
SELECTCOLUMNS (
Receiving,
"ItemID", Receiving[ItemID],
"Description", Receiving[Description],
"Item Type", Receiving[Item Type],
"QT", Receiving[Quantity]
)
VAR sending1 =
SUMMARIZE (
Sending,
Sending[ItemID],
Sending[Description],
Sending[Item Type],
"QT", SUM ( Sending[Quantity (all)] )
)
VAR OnlyRec =
ADDCOLUMNS ( EXCEPT ( receiving1, sending1 ), "From table", "Receiving" )
VAR OnlySend =
ADDCOLUMNS ( EXCEPT ( sending1, receiving1 ), "From table", "Sending" )
RETURN
UNION ( OnlyRec, OnlySend )
Which will get you this:
I've attached the sample PBIX file for your reference