Hi All,
I have struck in a scenario and it as below.
From above I need to check the case ID column for each case ID need to check "Action\No Action’ column,
Case1: for each case ID (present more than a time) then need to remove that row if the Action\No Action contains “No Action”,
Input for scenario 1:
| Case ID | Date | Time | Action\No Action |
|---|---|---|---|
| I240518000019 | 07/01/2024 | 09:30:26.6396879 | No Action |
| I240606000126 | 07/01/2024 | 09:31:19.7461929 | No Action |
| I240605000093 | 07/01/2024 | 09:32:17.6146882 | No Action |
| I240604000264 | 07/01/2024 | 09:33:20.8180588 | No Action |
| I240518000019 | 07/01/2024 | 09:30:27.2019679 | Action |
Output for scenario 1:
|Case ID |Date|Time|Action\No Action|
|I240606000126|07/01/2024|09:31:19.7461929|No Action|
|I240605000093|07/01/2024|09:32:17.6146882|No Action|
|I240604000264|07/01/2024|09:33:20.8180588|No Action|
|I240518000019|07/01/2024|09:30:27.2019679|Action|
for first scenario the output should be above
Case2: if any case ID is present more than once(duplicates) then need to remove keep only Action\No Action contains “No Action” row.
Input for scenario 2:
| Case ID | Date | Time | Action\No Action |
|---|---|---|---|
| I240518000019 | 07/01/2024 | 09:30:26.6396879 | No Action |
| I240606000126 | 07/01/2024 | 09:31:19.7461929 | No Action |
| I240605000093 | 07/01/2024 | 09:32:17.6146882 | No Action |
| I240604000264 | 07/01/2024 | 09:33:20.8180588 | No Action |
| I240518000019 | 07/01/2024 | 09:30:27.2019679 | Action |
| I240518000019 | 07/01/2024 | 09:30:26.6396879 | No Action |
Output for scenario 2:
| Case ID | Date | Time | Action\No Action |
|---|---|---|---|
| I240518000019 | 07/01/2024 | 09:30:26.6396879 | No Action |
| I240606000126 | 07/01/2024 | 09:31:19.7461929 | No Action |
| I240605000093 | 07/01/2024 | 09:32:17.6146882 | No Action |
| I240604000264 | 07/01/2024 | 09:33:20.8180588 | No Action |
| I240518000019 | 07/01/2024 | 09:30:27.2019679 | Action |
In short if any Case ID column not contains duplicate then need to remove the complete row if the column “Action\No Action” contains No action , need to keep only Action.
If any case ID is duplicate then need to delete only one row from the Action\No Action
contains No action.
thanks in advance
