Hi Guys,
I have a logic in a table below, I want to incorporate this logic in my main data set.
For example Combination 1 states if in my main dataset "Cost" column value = 109353 and "Profit" column value = 143085 then filter my main data as Required. Similarly each combination conditions i need to incorporate in my main data set and lastly categorised them as Group 1 etc.
| Groups | Combination | Column names | Sign | Description | Value |
| Group 1 | 1 | Cost | = | is equal | 109353 |
| Group 1 | 1 | Profit | = | is equal | 143085 |
| Group 1 | 2 | Profit | >= | is greater or equal | 114558 |
| Group 1 | 2 | Profit | <= | is smaller or equal | 164925 |
| Group 1 | 2 | Cost | >= | is greater or equal | 180052 |
| Group 1 | 2 | Cost | <= | is smaller or equal | 133952 |
| Group 1 | 3 | Profit | = | is equal | 176437 |
| Group 1 | 3 | Cost | = | is equal | 166891 |
| Group 1 | 4 | Profit | = | is equal | 144627 |
| Group 1 | 4 | Cost | = | is equal | 198735 |
| Group 1 | 5 | Cost | = | is equal | 166080 |
| Group 1 | 5 | Profit | = | is equal | 130630 |
| Group 1 | 6 | Cost | = | is equal | 129679 |
| Group 2 | 1 | Cost | = | is equal | 197602 |
| Group 2 | 1 | Level0 | <= | is smaller or equal | 172640 |
| Group 2 | 2 | Cost | = | is equal | 105669 |
| Group 2 | 3 | Level0 | > | is greater | 162398 |
| Group 2 | 3 | Cost | = | is equal | 106784 |
Example: below is a snippet of my Raw input of main dataset
| Cost | Profit | Level0 |
| 109353 | 143085 | 190734 |
| 102226 | 148795 | 189911 |
Required output after incorporating the above logic in the main data set:
| Cost | Profit | Level0 | Checks | Groups |
| 109353 | 143085 | 190734 | Required | Group 1 |
| 102226 | 148795 | 189911 | Not required | |
Kindly help in suggesting a way using which i can incorporate the logic into my main data set. Thanks.