Forum Discussion
Akos07
4 years agoHelper I
Stock quantity counting help
Hi, I have the following problem. My matrix countains products, currentstock at time, and current price at the time. As you can see, this product started with 40 stock, and gets low...
- 4 years ago
Hi, i found the solotion. In the item table for each row i created a new cumulative sum column. After that, i created a measure that gets me the max ID for each date. After that i know the row with the quantity i am looking for.
Akos07
4 years agoHelper I
| DocumentHeaderId | DocumentNumber | Direction | DirectionStr | PartnerId | StoreId | WarehouseId | ProductId | ProductCode | ProductName | ProductTypeName | ItemQuantityDir | ItemNetPrice | ItemGrossPrice | ItemNetValuePromo | ItemGrossValuePromo |
| 117 | PNY22-100-0053 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -2 | 1686,44 | 1990 | 3372,88 | 3980 | |
| 10 | RKV22-100-0001 | 1 | (+) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | 20 | 1121 | 1322,78 | 22420 | 26455,6 | |
| 9 | RKA22-100-0001 | -1 | (-) | 2 | 3 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -20 | 1121 | 1322,78 | 22420 | 26455,6 | |
| 2 | BSZ22-PC-0001 | 1 | (+) | 1 | 2 | 3 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | 40 | 1121 | 1322,78 | 44840 | 52911,2 |
| 111 | PNY22-100-0051 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 91 | PNY22-100-0035 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 79 | PNY22-100-0030 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 78 | PNY22-100-0029 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 68 | PNY22-100-0023 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 64 | PNY22-100-0020 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 61 | PNY22-100-0019 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 44 | PNY22-100-0013 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 30 | PNY22-100-0007 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 | |
| 27 | PNY22-100-0006 | -1 | (-) | 2 | 2 | 1 | 1 | Heumann macesz dara (kóser) 400g | Normal | -1 | 1686,44 | 1990 | 1686,44 | 1990 |
lbendlin
4 years agoSuper User
which of these samples is the header view and which is the item view? Also - what is your locale?