nurhazx Posted October 19, 2023 Posted October 19, 2023 Hi All, I want to calculate total duration of running machine between strainer replacement. I am trying with formula below but getting error. $series.setMaximumDuration(500day).aggregate(totalDuration("h"), $capsules.setMaximumDuration(500day), startKey(), 500day).toStep() Note: Purple capsule is a running condition Yellow capsule is a time range between strainer replacement Red capsule is a strainer replacement period
Seeq Team John Brezovec Posted October 19, 2023 Seeq Team Posted October 19, 2023 Since you already have identified: When the equipment is running (Purple Condition) Time periods that you want to aggregate within (Yellow Condition) We should be able to accomplish this with a single Signal from Condition, using the 'Equipment Running' condition as the selected condition, total duration as the statistic, and the 'Time Between Replacement' condition as your bounding condition. The setup should look something like this: If you prefer to do it in formula, the equivalent would be: $equipmentRunning.setMaximumDuration(500day).aggregate(totalDuration("h"), $timeBetweenReplacement.setMaximumDuration(500day), durationKey()) If you still get an error from that let me know what it is.
nurhazx Posted October 23, 2023 Author Posted October 23, 2023 (edited) Hi John, I still got an error in (pic below). If I reduce the time duration it still the same Edited October 23, 2023 by nurhazx
Seeq Team Nuraisyah Rosli Posted October 23, 2023 Seeq Team Posted October 23, 2023 Hi Nur, As discussed during the call, the yellow icon is not an error, it's just a warning message since you set the maximum capsule duration to be 1000d. 1
Philip Posted December 31, 2023 Posted December 31, 2023 Hi, I have a related question. Instead of the total duration of all the purple capsules within the filter replacement time range, suppose I want to know the % duration of Filter Time Range is does each purple capsule represent?
Seeq Team Nuraisyah Rosli Posted January 1, 2024 Seeq Team Posted January 1, 2024 On 12/31/2023 at 8:19 AM, Philip said: Hi, I have a related question. Instead of the total duration of all the purple capsules within the filter replacement time range, suppose I want to know the % duration of Filter Time Range is does each purple capsule represent? Hi Phillip, In that case you can select percent duration as summary statistic in you Signal from Condition tool. Choose the purple capsule as the first signal, and Filter time range as your bounding condition.
Philip Posted January 2, 2024 Posted January 2, 2024 Thanks! and Happy New Year! So, when I do that it returns 100%. Since the Filter time encloses all purple capsules.
Seeq Team Nuraisyah Rosli Posted January 2, 2024 Seeq Team Posted January 2, 2024 You can refer to my screenshot below, as you can see that the brown capsules encloses all the purple capsules but it will calculate the % of time purple capsules within the brown capsules . My guess is maybe you put the purple capsules as bounding condition. In that case, yes it will give a 100% result as screenshot below: Let me know if this helps or maybe you can share screenshots of your workbench for me to understand better. Alternatively, you can also join our Office Hour session where you can discuss directly with our Analytics Engineer.
Philip Posted January 2, 2024 Posted January 2, 2024 You are correct. I'm interested in the proportion of Day condition, that EACH purple capsule consumes. The way is works currently, is to sum the durations of all purple capsules within the Day and then report that % as a single value.
Seeq Team Nuraisyah Rosli Posted January 2, 2024 Seeq Team Posted January 2, 2024 Ok, now I understand what you're trying to achieve. For this, you have to calculate the total duration separately and use Formula tool to manually calculate the Percent duration. 1. calculate total duration for purple capsule 2. calculate the total duration for daily condition 3. calculate the percent duration using Formula tool. It should generate result like this where you have value for each capsules. Let me know if this answer your question.
Philip Posted January 4, 2024 Posted January 4, 2024 Indeed, this is exactly what I ended up doing. Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now