Hi Team,
I hope you are doing well :)
I have a below table
| Category | Codes | Dept Code | Roll no | Previos month | Amount | Code + Dept Code |
| STD | ABCD | CA | 12 | -183.14 | ABCD CA | |
| STD | ABCD | CA | 12 | -183.13 | ABCD CA | |
| STD | PQRS | HR | 13 | 183.14 | PQRS HR | |
| STD | PQRS | HR | 14 | Dec-Jan-Feb'25 | 185.13 | PQRS HR |
| STD | WXYZ | CA | 13 | Dec-Jan-Feb'25 | -194648.44 | WXYZ CA |
| STD | WXYZ | CA | 13 | Dec-Jan-Feb'25 | 194648.44 | WXYZ CA |
where i have concatenate a column based on field Codes and Dept code and called the new column as Codes + dept Code
Now for each unique values for column Codes + Dept Code i have to test whether previous month column value is blank or zero and if it is blank or zero i have to check another Codes + Dept Code unique value.
for other than blank or zero values in previous month column i have to check the maximum value in amount column and populate that records into output file.
Many Thanks in advance!!
@sneha_bhiwagade1 Can you provide the expected output?
Hi,
@binu_acs below is the expected output
Category Codes Dept Code Roll no Previos month Amount Code + Dept Code
STD PQRS HR 14 Dec-Jan-Feb'25 185.13 PQRS HR
STD WXYZ CA 13 Dec-Jan-Feb'25 194648.44 WXYZ CA
Thanks