Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear community,
I am looking to find the minimum date where stock, a field in my pivot table, different than 0.
How can I write that?
Thank you,
Abdallah
Found my mistake. Try:
Sum({<TRANSACTION_DATE = {'$(=Min({<STOCK -= {0}>} TOTAL TRANSACTION_DATE))'}>} TOTAL STOCK)
Hi again Jensmunnichs,
Now the expression sum(stock) is giving good results when the interval of dates does not contain null value (0: as stock).
I changed the date interval by changing start date and end date and the expression: =Min({<STOCK -= {0}>} TRANSACTION_DATE) is returning the date where STOCK = 0, but it should return the next date where STOCK <> 0.
Any idea on how to fix this problem?
Best regards,
Abdallah
Start Date | = | 23/11/2014 |
End Date | = | 30/11/2014 |
CODE_PROD | LIB_SS_PRODUIT | ProductCodeKey |
3 | PHOSPHATE | 7-1-- |
3 | PHOSPHATE | 7-2-- |
LIB_PRODUIT | Min transac date | Min stock |
23/11/2014 | 0 | |
PHOSPHATE | 23/11/2014 | 0 |
LIB_PRODUIT | TRANSACTION_DATE | STOCK | Sum stock |
PHOSPHATE | 23/11/2014 | 0 | 0 |
PHOSPHATE | 24/11/2014 | 0 | 0 |
PHOSPHATE | 24/11/2014 | 625 | 625 |
PHOSPHATE | 24/11/2014 | - | 0 |
PHOSPHATE | 25/11/2014 | 241 | 241 |
PHOSPHATE | 25/11/2014 | 1130 | 1130 |
PHOSPHATE | 25/11/2014 | - | 0 |
PHOSPHATE | 26/11/2014 | 940 | 940 |
PHOSPHATE | 26/11/2014 | 1166 | 1166 |
PHOSPHATE | 26/11/2014 | - | 0 |
PHOSPHATE | 27/11/2014 | 334 | 334 |
PHOSPHATE | 27/11/2014 | 759 | 759 |
PHOSPHATE | 28/11/2014 | 44 | 44 |
PHOSPHATE | 28/11/2014 | 228 | 228 |
PHOSPHATE | 29/11/2014 | 25 | 25 |
PHOSPHATE | 29/11/2014 | 815 | 815 |
PHOSPHATE | 29/11/2014 | - | 0 |
PHOSPHATE | 30/11/2014 | 51 | 51 |
PHOSPHATE | 30/11/2014 | 58 | 58 |
PHOSPHATE | 30/11/2014 | - | 0 |
Total | Total | Total | 6416 |
Thank you,
At the first check it is working.
I will check all the possibilities, by changing start date and end date, and I will let you know.
Many thanks again,
Abdallah
Hi Jensmunnichs,
I did my tests and the 2 expressions are working.
Thank you very much.
Abdallah