Jump to content

Ben K

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

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

Ben K's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • First Post
  • Reacting Well
  • Conversation Starter

Recent Badges

0

Reputation

  1. Thanks! Is it possible to do it in a way that does not require adjacent batches? Sometimes we switch products, so I would like to create a capsule that contains the last N batches of the same product, which may not be continuous. I feel like there must be some way to do it with condition table formulas and top(), but I can't figure out how to convert my table back to capsules.
  2. I am trying to create a condition that displays most recent 20 batches in the last month. Is there a good way to do this? I am currently using the below formula, but I get the error Uncertain Scalars cannot be used as thresholds for ScalarPredicates at 'isGreaterThanOrEqualTo', because it seems my $earliest_start is always an uncertain value. $capsule = capsule(now() - 1month, now()) $selected = $batch_condition.toGroup($capsule,CapsuleBoundary.EnclosedBy).pick(-20) $earliest_start = $selected.startKey() $batch_condition.removeLongerThan(40h).keep('Start',isGreaterThanOrEqualTo($earliest_start)) Is there any way I can fix this issue or get the most recent 20 batches another way?
×
×
  • Create New...