Forum Discussion
Anonymous
1 year agoNot applicable
Power BI formula needed
Please help in calculating the Day Level Order Balance Qty Note - Data is shorted by Order Date first then Order Qunatity Material_Location_Order Booked Date Location Material Order Quanti...
Anonymous
1 year agoNot applicable
Ryan I have tried your formula, need further help, I calculated the Index for each unique value i.e. Inventory Key with below formula
I have useded your formula to calculate the Balance Qty, below is the formula.
Balance qty values are not what I was expecting, my desire outcome is column "Expected Output" in the below tabel which I have calculated manually.
Please help me to get the Expected Output value calculation formula
| Inventory Key | Depot | Material | Order Quantity(Item) | Order Booked Date | Inventory Key | Opening Inventory | Sales Order Total | Index | Balance Qty | Expected Output |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 4 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 352 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 16 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 336 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 10 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 326 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 8 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 318 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 1 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 317 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 2 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 315 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 2 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 313 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 2 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 311 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 2 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 309 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 4 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 305 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 1 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 304 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 4 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 300 |
| 933001990099911031/8/2025 | 1103 | 9330019900999 | 10 | 08-Jan-25 | 933001990099911031/8/2025 | 356 | 66.00 | 36160 | 290 | 290 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 4 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 468 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 4 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 464 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 4 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 460 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 12 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 448 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 2 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 446 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 6 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 440 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 6 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 434 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 40 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 394 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 28 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 366 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 2 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 364 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 2 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 362 |
| 933001990099911041/8/2025 | 1104 | 9330019900999 | 6 | 08-Jan-25 | 933001990099911041/8/2025 | 472 | 116.00 | 36171 | 356 | 356 |
ryan_mayu
Super User
1 year agodo not use DAX to create an index column ,just create it in the power query
Column = 'Table'[Opening Inventory]- sumx(FILTER('Table','Table'[Depot]=EARLIER('Table'[Depot])&&'Table'[Index.1]<=EARLIER('Table'[Index.1])),'Table'[Order Quantity(Item)])
pls see the attachment below