I need some help calculating mean for marks but only for the ones that are over a specific criteria in a row.
Here is some data example and expected result
Id. Marklist mark
1 1 8
1 2 9
1 3 7
2 1 9
2 2 9
2 3 8
3 1 8
3 2 7
3 3 9
Here are the expacted results for each id when the criteria is 8:
For id 1 - mean of 8 + 9 - the 3rd. One is not in criteria
For id 2 - mean of 9 + 9 + 8 - all are over criteria
For id 3 - only 8 - though the last one is 9 they are not in a row
Thank you
Tal
Here is some data example and expected result
Id. Marklist mark
1 1 8
1 2 9
1 3 7
2 1 9
2 2 9
2 3 8
3 1 8
3 2 7
3 3 9
Here are the expacted results for each id when the criteria is 8:
For id 1 - mean of 8 + 9 - the 3rd. One is not in criteria
For id 2 - mean of 9 + 9 + 8 - all are over criteria
For id 3 - only 8 - though the last one is 9 they are not in a row
Thank you
Tal