There seems to be a misunderstanding. I do not want to find the max for a moving window. I want to find the max for "Data valid". I want to specify the condition for "Data valid" and find the max for capsules with that condition. In my case I have only 1 capsule for this condition. Whatever that max value is, I want the signal to apply for all time, like a constant. We have accomplished creating the signal for all time, but the capsule("2020-01-01T00:00:00Z","2022-07-28T00:00:00Z") uses a fixed time period instead of the "Data valid" condition. If there is a way to use "Data valid" instead of hard coded times, I will have what I want.