Hi there,
I'm having trouble processing this dataset. For each variable I need to sum the quantity (number before lowercase x) each variable occurs at, only when the number of days is 6 or higher - everything else is excluded. In theory there can be any number of lines of data under "Past:", any quantity (1x to 99x and theoretically upwards) of each variable occurring, and any number of days after "Aged", so i need a dynamic approach which is what's confusing me. The "Past Text" column changes from dataset to dataset that this will be applied to, but the rules remain the same. I've included dummy data below with all the possible rules included.
Does anyone have any ideas how i can get this to dynamically sum the quantity when the condition more than 5 Days Aged is met?
Thanks in advance for any ideas.
| Var | Past Text | Desired Output |
| 1 | Past: 1x Aged 5 Days 1x Aged 6 Days 3x Aged 4 Days | 1 |
| 2 | Past: 3x Aged 3 & 11 & 16 Days 1x Aged 6 Days | 3 |
| 3 | Past: 3x Aged 6 & 3 & 9 Days 1x Aged 17 Days | 3 |
| 4 | Past: 4x Aged 3 Days | 0 |
| 5 | Past: 32x Aged 11 Days 2x Aged 3 & 6 Days | 33 |