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 )
Anonymous
5 years agoNot applicable
Amazing! Thanks PaulDBrown
One final question, in my sending table I have a "Status" column that shows the item's current status. Do you have a recommendation for me to integrate it to this table differences, so it ignores items that has the status "In transit"?
Thanks,
PaulDBrown
Community Champion
5 years agoYou 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 )