Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
Have a table:
ID | Outcome |
1 | Not Run |
2 | Passed |
3 | Passed |
4 | Not Run |
5 | Not Run |
6 | Not Run |
7 | Not Run |
I need to check if last Outcome was Not Run, then i need to avoid those rows and select Passed with ID: 3 (in that case it was the latest Passed
and final result:
ID | Outcome |
1 | Not Run |
2 | Passed |
3 | Passed |
To summarize i need to check based from the last outcome and select any that are not [Not Run]
@Micki what is the criteria to check last outcome? Is there any Date or something?
@Kushal_Chawda , by ID only, so it's like going upward, script should check if ID - Not Run then upward, until the first not - Not Run value appears
Hi @Micki
Try like below to get the Ids upto the latest Passed information
Table:
Load *, RowNo() as Row Inline
[
ID,Outcome
1,Not Run
2,Passed
3,Passed
4,Not Run
5,Not Run
6,Not Run
7,Not Run
8,Not Run
];
MaxTemp:
Load Max(Row) as MaxRow Resident Table where Outcome = 'Passed';
Let vMaxRow = Peek('MaxRow');
NoConcatenate
Load * Resident Table where Row <= $(vMaxRow);
DROP Table Table, MaxTemp;