Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone,
I want to calculate how complex an order is.
Let me explain.
I have two tables:
ITEMS(ID_item, Warehouse_info)
SALES(ID_sales, ID_Order, ID_item)
ID_Item s are linked one to the other.
The warehouse info is a string like that "-A-B-" or "-C-" or "-A-B-C-".
ID_Sales is the key of the table, while ID_order is the code that groups many ID_Sales. Every ID_Sales has one only item, which is ID_Item.
I want to calculate the minimum number of warehouses that are needed to fulfill the order.
For example:
ITEMS
ID_Item Warehouse_info
0004 "-A-B-"
0005 "-A-B-C-"
0006 "-A-C-"
0007 "-B-"
SALES
ID_sales ID_Order ID_item
S0001 O00001 0004
S0002 O00001 0005
S0003 O00002 0006
S0004 O00002 0004
S0005 O00003 0007
S0006 O00003 0004
I want that the measure will return (in a table):
ID_Order Minimum WH Number
O00001 1 (Because the first item can be bought in A or B, and also the second)
O00002 1 (Because both can be bought in A)
O00003 2 (Because the first item is only stored in B, but i need another Warehouse for the second item, which is A or B)
Thanks
Hi @Veigar
Not sure why O00003 needs 2, Item 0004 and 0007 can be stored in B, or the WH is like a sequential A-B-C, so it basically needs to be stored in A first? What if 0007 is -B- only, and 0004 is -B-C-? Then it is 1 or 2?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 50 | |
| 43 |