Number
|
Item | Parent | Description | Debit Quantity | Credit Quantity | Cost/unit | Cost | Rollup Cost/unit (expected) | Rollup Cost/unit (current = bad) | Date |
1 | Item 01 | Arrival warehouse 01 | 100 | 50 (01/10) + 5 (01/13) | 10$ | 1000$ | 10$ | 10$ (01/01) -> 11$ (01/10) -> 51$ (01/12) -> 86$ (01/13) -> 88$ (01/22) | 2025/01/01 | |
2 | Item 01 | 1 | Move warehouse 02 | 50 | 10 (01/12) | 1$ | 50$ | 11$ | 1$ (01/10) -> 41$ (01/12) -> 76$ (01/13) -> 78$ (01/22) | 2025/01/10 |
3 | Item 01 | 2 | Ship to customer 01 | 10 | 10 (01/22) | 40$ | 400$ | 51$ | 40$ (01/12) -> 42$ (01/22) | 2025/01/12 |
4 | Item 01 | 1 | Ship to customer 02 | 5 | 35$ | 175$ | 45$ | 35$ (01/13) | 2025/01/13 | |
5 | Item 01 | 3 | Duty on shipment | 10 | 2$ | 20$ | 53$ | 2 $ (01/22) | 2025/01/22 |
Format Name | Description | Parent | Package | Quantity | Total Quantity | Total Quantity (expected) | Unit |
Format 1.0 | Pack of 6 unit | Pack | 6 | 6 | unit | ||
Format 1.1 | Box of 4, Pack of 6 unit | Format 1.0 | Box | 4 | 24 (6*4) | unit | |
Format 1.2 | Pallet of 8, Box of 4, Pack of 6 unit | Format 1.1 | Pallet | 8 | 192 (6*4*8) | unit |
TotalQuantity = IfError('Parent'.TotalQuantity * Quantity, Quantity)
Since rollup columns naturally aggregate from child to parent, and calculated columns are being phased out, here’s how you can achieve parent-to-child aggregation:
Formula Columns allow you to perform calculations dynamically using Power Fx.
You can reference the parent record’s value and apply a formula to calculate the child’s total quantity.
Example Formula:
Parent.TotalQuantity * Child.Quantity
This ensures that the child’s total quantity is derived from the parent.
If Formula Columns don’t meet your needs, you can use Power Automate to update child records whenever the parent record changes.
Steps:
Trigger the flow when a parent record is updated.
Retrieve all child records linked to the parent.
Update each child record with the calculated total quantity.