I am trying to count the consecutive weeks an item is below its average for a given period of time. Not sure how to do this. Item 123 should have an output of 3 and item 1234 should have an output of 1.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]10/20[/TD]
[TD]10/27[/TD]
[TD]11/3[/TD]
[TD]11/10[/TD]
[TD]Avg[/TD]
[TD]Consecutive WK Below Avg[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]15[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]15[/TD]
[TD]14[/TD]
[TD]15[/TD]
[TD]8[/TD]
[TD]13[/TD]
[TD]???[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]10/20[/TD]
[TD]10/27[/TD]
[TD]11/3[/TD]
[TD]11/10[/TD]
[TD]Avg[/TD]
[TD]Consecutive WK Below Avg[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]15[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]15[/TD]
[TD]14[/TD]
[TD]15[/TD]
[TD]8[/TD]
[TD]13[/TD]
[TD]???[/TD]
[/TR]
</tbody>[/TABLE]