I need some help here. I have a bunch of loans that have a manual adjustments and some dont, i need a way to only pick the adjusted loans if there is any and if there isnt then just go with the not adjusted loan. 1 being adjusted and 0 being not adjusted. Example below, i only need the loans with ManAdjlnd 1
AsOfDate | ClientNbr | ManAdjInd |
6/30/2022 | 364754 | 0 |
6/30/2022 | 364754 | 0 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 0 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
but if there is no adjustment (0) then we will still keep it.
6/30/2022 | 4198 | 0 |
what's the most efficient and simple way to do this? I included an excel sheet.
Hey @ntudev,
Hope I understood and this is what you are looking for. If the dataset contains at least one '1' in ManAdj then it returns thoose lines, otherwise it will return the '0' lines.
not quite, if you see the below with the same clientnbr and different manadjlnd
AsOfDate | ClientNbr | ManAdjInd |
6/30/2022 | 364754 | 0 |
6/30/2022 | 364754 | 0 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 0 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
then we should get the below. only 1s and no 0s.
AsOfDate | ClientNbr | ManAdjInd |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
6/30/2022 | 364754 | 1 |
and if clientnbr is the same and all the manadjlnd is 0 then we just get the 0s.
AsOfDate | ClientNbr | ManAdjInd |
6/30/2022 | 466357 | 0 |
6/30/2022 | 466357 | 0 |
does it make sense now?