Additional test data:
Area | Category | Date |
---|
F | Medium High | 202306 |
F | Medium High | 202305 |
F | Medium High | 202302 |
F | Medium High | 202301 |
Rows 202303 and 202304 are missing, so would this be considered as 3 or more times consecutive occurences?
If the date is not present, it means that no data was registered. So it won’t be considered as consecutive.
Thanks for your reply. I suspected as much, but there was no example data for this situation.
I'll take a look.
Something like this?
First the workspace adds all missing Area + Date combinations.
Then the consecutive occurences are counted. The AttributeManager uses Adjacent Feature Attributes, the Statistics Calculator gets the maximum values.
Some areas are missing from the results, so they are added in the last step.
Funny, I answered a related question of you last week
Thank you!
It seems it is what I was looking for.
Can you maybe send it with an older version of fme? 2022.2
I've added a FME 2020 version of the workspace to this reaction (as I don't have 2021 or 2022 installed).
By the way, the conditional value using Adjacent Feature Attirbutes looks like this:
I am not quite sure about my workspace though. Something like
Area | Category | Date |
---|
A | Low | 202301 |
A | Low | 202302 |
A | Low | 202303 |
A | | 202304 |
A | | 202305 |
A | Low | 202306 |
A | Low | 202307 |
A | Low | 202308 |
A | Low | 202309 |
A | | 202310 |
A | High | 202311 |
A | | 202312 |
will only give
Area | Condition | Consecutive |
---|
A | Low | 4 |
but maybe it should return
Area | Condition | Consecutive |
---|
A | Low | 4 |
A | Low | 3 |
I changed the logic of determining the groups of consecutive occurences.
In the case I described above, this workspace returns
Area | Condition | Consecutive |
---|
A | Low | 4 |
A | Low | 3 |