Skip to main content
Solved

Identify identical consecutive values in a period


nedwaterman
Contributor
Forum|alt.badge.img+9

Hi,

I have meter data that is currently processed by FME into 15 minutes values, 96 values being in one day.

I have been asked to identify if there are 3 or more identical values in the 02:00 - 04:00 that would be the same, as this may prove that the meter has flatlined and is no longer recording the flow.

I've not done this before - can anyone please suggest any FME workflow which might identify identical consecutive values and add a value to an attribute? I attach some test data whilst I try and figure it out myself.

 

Cheers

N

Best answer by nedwaterman

Hi ebygomm (cool alias by the way,tickled me)

 

That's wonderful, thank you. I only need to calculate by date (ie if it runs over into the next day it's nt a problem). Is that possible?

 

Cheers

N

View original
Did this help you find an answer to your question?

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • April 7, 2020

This process would return all the instances where the value is the 3rd or more duplicate value in a row. Would require a bit more development if you wanted to return all the values in the duplicated sequence

 

 

If you wanted to return all values that form part of a duplicate run of 3 or more, you could use the following in an attributecreator instead

3adjacent.fmwt


nedwaterman
Contributor
Forum|alt.badge.img+9

Hi ebygomm (cool alias by the way,tickled me)

 

That's wonderful, thank you. I only need to calculate by date (ie if it runs over into the next day it's nt a problem). Is that possible?

 

Cheers

N


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • April 7, 2020
nedwaterman wrote:

Hi ebygomm (cool alias by the way,tickled me)

 

That's wonderful, thank you. I only need to calculate by date (ie if it runs over into the next day it's nt a problem). Is that possible?

 

Cheers

N

To start afresh each date, you would just need to introduce an additional condition to check that the date is the same as the previous value. 

Use an attribute creator to create a new attribute holding the Date only

@DateTimeFormat(@Value(DTT),%Y%m%d)d

Then add some additional tests

0684Q00000ArMX3QAN.png


nedwaterman
Contributor
Forum|alt.badge.img+9
nedwaterman wrote:

Hi ebygomm (cool alias by the way,tickled me)

 

That's wonderful, thank you. I only need to calculate by date (ie if it runs over into the next day it's nt a problem). Is that possible?

 

Cheers

N

Sorted! Great stuff - thanks for your help.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings