Forum Discussion
Correct Batch used?
I get slightly different results...
- Anonymous3 years agoNot applicable
Hey lbendlin,
Thanks for taking the time to help me get started on the logic of doing this!! Much appreciated!
Just trying to understand why article 0002 and 0003 don't get a Best Batch result, as var ar makes sure that the correct article is selected...- lbendlin3 years ago
Super User
Transaction Date is past Expiration Date, violating rule 3.
- Anonymous3 years agoNot applicable
For article 0002 batch 0002C is perfectly correct and for article 0003 batch 0003C is correct.
I just noticed checking this that if I alter ASC to DESC in var b, I get results for all articles.Issue is however that index 1 gives an incorrect value, as there are 2 correct batches there. As DESC is now active, result for that line is the batch with the "youngest" expiration date.
To check this, I changed the TOPN to 2 and I get 2 batches as result:
This gets me closest to the desired result. But I need TOPN as 2 to have values for articles 0002/0003, as TOPN as 1 gives no result. Which makes me think that the filter values in VAR a have null values somehow...
I'm confused 🙂