Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
In my data model I have an Orders table (customer orders transactions data).
Some of the orders are error or historical that should be excluded.
The users send us an excel file containing the orders to exclude.
For example:
Orders table:
OrderID | ItemNo | Quantity |
223 | 1 | 4545 |
223 | 2 | 434 |
433 | 1 | 4545 |
224 | 1 | 64 |
224 | 2 | 23 |
434 | 1 | 23 |
225 | 1 | 23 |
Orders to exclude:
OrderID | ItemNo | Quantity |
224 | 1 | 64 |
224 | 2 | 23 |
434 | 1 | 23 |
How do you set-up an exclusion file so that these orders are excluded from the Orders table?
Try with exists() like:
Exclude:
Load OrderID from <>;
FactTable:
Load * from <> where not exists(OrderID);
Do you need exclusion just based on OrderID or OrderID and ItemNo? For both, you can try this
Exclude:
Load OrderID&ItemID as OrderItemKey from <>;
FactTable:
Load * from <> where not exists(OrderItemKey, OrderID&ItemID);