Remove the line based on the codition
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Sshasnk
8 - Asteroid
‎04-15-2023
08:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So I have dataset and I below are the rules
1. If I have A and B in the same account excluding all the B's and keep all the A's
2. If only A is there keep all of them
3. If only B is there keep all of them.
Note: There could be N number of B's and A's in the same account.
Input:
Account | value |
123 | A |
123 | B |
123 | A |
124 | A |
124 | A |
125 | B |
125 | B |
121 | B |
123 | B |
In the above example for account 123 we have 2 B but it could be 3,4 or 5 and the solution should be dynamic to remove all the B's
For account 124 we don't have to remove as rule 2 say
and same goes for 125 and 121 according to rule number 2&3
Output:
Account | value |
123 | A |
123 | A |
124 | A |
124 | A |
125 | B |
125 | B |
121 | B |
Labels:
2 REPLIES 2
RobertOdera
13 - Pulsar
‎04-15-2023
11:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @Sshasnk
Try this revised approach.
Using Tile to keep it as dynamic as possible (hard to tell without a scaled sample)
I hope you find it helpful - cheers!
FrederikE
13 - Pulsar
‎04-15-2023
12:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
