Reputation: 25
I have a DataTable and the data is showing fine. Here is an example:
Name | Month | Score |
---|---|---|
Allison | June 2021 | 5 |
Allison | July 2021 | 7 |
Allison | August 2021 | 3 |
Benjamin | June 2021 | 10 |
Benjamin | July 2021 | 4 |
..... | ..... | .... |
For each same Name, I want to do the following:
For each same Name in the table, Example "Allison" >> For each score >> If score=>5 for last consecutive two months, then show rows of Allison for the last two months.
Upvotes: 0
Views: 280
Reputation: 124
There could be multiple ways:-
Steps to perform for your custom method are:
if score of n-1 and n-2 record are >=5
AND
if n(name),n-1(name),n-2(name) records all are the same
AND
if val(n-1(month)) == val(n-2(month))-1
THEN
hide current(n) row
Upvotes: 1