Jump to content

Sam.G

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Sam.G's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • First Post
  • Conversation Starter

Recent Badges

1

Reputation

  1. Hmm.. so the rest of the code block needs to go before the .setProperty section? I'm still getting the same error, see attached. The "good runs" condition already exists, which is why I'm not defining it within the code, but can add that if necessary.
  2. $pt.toCondition('Product ID') .removeLongerThan(100d) .setProperty('Avg A', $a, average()) .setProperty('Avg B', $b, average()) .setProperty('Avg C', $c, average()) Sorry, should have provided that before. If I add anything below this code it gives me the EOF error.
  3. I think I have this working now, but there is one big difference -- every time I tried to include the toCondition section for Product ID, I'd get an error saying it was expecting EOF. So I left that section in a separate condition, but I think that's giving me some issues when it comes to the table. How can I put all the code in one formula? Do I need to add some symbol to "end" the toCondition part and allow the script to proceed?
  4. This was incredibly helpful, thank you! I'll need to tweak this slightly as I've realized I'll need to filter by Product ID and an additional variable, but think what you've shared here is enough for me to figure out the rest. Will reply back if not. Thanks again!
  5. Appreciate the reply, fosterda. That does help, though it's hard to confirm without the Product ID filtering piece haha. The original Product Type signal is a string, and I have a formula that converts that signal to a condition ($product_type.toCondition('Product ID')). The formula also applies three properties to the condition, each being the average of one of the measurements we're focused on.
  6. The goal: to build a table comparing the averages of several measurements from each production run to the monthly averages for the same product code from the same month a year prior -- but only from runs that meet "good run" criteria. So something like the attached image. What I'm having trouble with is the previous year monthly averages. I need to not only take monthly averages, but only averages from periods that meet a specific condition: when all three measurements are above setpoint. The idea here is we want to establish what "good" averages looked like during similar atmospheric conditions, and compare recent run averages to them. Additionally, we need to separate these out by Product ID. There are many different products, so manually specifying them all is not feasible. Example case: It's May 2024 and we just finished running Product A. We want to see how the measurement averages compare with last year, same month runs. We ran Product A ten times in May 2023, but only certain parts of those ten runs met the "good run" condition. We want to take the average of all of those "good run" periods for Product A from May 2023. Happy to provide any other information that might be helpful.
×
×
  • Create New...