I have a queue with a random distributed attribute. There come 5 quants with attributes 4, 1, 7, 2, 9. I would like to separate those quants with low attribute (e.g. < 4) from those with high attribute, that is quants no. 2 and no. 4 flows in another stock than quants no. 1, 3 and 5 .
Is this possible?
separate quants by attribute in a queue
separate quants by attribute in a queue
Peter Addor
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
The attributes going into a QUEUE FIFO are all identical at a time. If you have 5 items, each with a different attribute entering you will need to average these. For example assuming the attributes at a time are subscripted you would use
quantity to high quality = SUM(IF THEN ELSE(quality[item!] >= 4,
quantity[item!],0))
avg quality to high quality = ZIDZ(SUM(IF THEN ELSE(quality[item!] >- 4, quality[item!],0)),quantity to high quality)
with similar logic for low quality.
I hope that is helpful. If I did not understand the question let me know.
quantity to high quality = SUM(IF THEN ELSE(quality[item!] >= 4,
quantity[item!],0))
avg quality to high quality = ZIDZ(SUM(IF THEN ELSE(quality[item!] >- 4, quality[item!],0)),quantity to high quality)
with similar logic for low quality.
I hope that is helpful. If I did not understand the question let me know.