Jump to content

"No variant of function 'maxValue' consumes the parameters (Signal, Condition)" Error Occurs when using maxValue() to calculate the Maximum Value of a Signal within a Condition


Go to solution Solved by Dan FR,

Recommended Posts

  • Seeq Team
Posted (edited)

User observes the error "No variant of function 'maxValue' consumes the parameters (Signal, Condition)" when using maxValue() to find the maximum value of a signal for each capsule in a condition?

Edited by Dan FR
Link to comment
Share on other sites

  • Seeq Team
  • Solution

Calculating the maximum value of a signal for each condition is a common analytics workflow performed in Seeq.

Users often start with the maxValue() function within the Seeq Formula Tool, but will run into challenges or errors. This is because the maxValue() function expects a single capsule ($capsule) as an input, as opposed to a condition, which is a collection of capsules.  If a user attempts to pass a $condition into maxValue() they will be met with the following error:

No variant of function 'maxValue' consumes the parameters (Signal, Condition)

Instead, the aggregate() function should be used when the intent is to find the maximum value for each capsule in a condition.  For example:

$signal.aggregate(maxValue(), $condition, durationkey())

This will create a signal indicating the maximum value for each capsule within $condition.  The durationkey() argument can be modified to the users liking for where to place the signal timestamp (startkey(), endkey(), etc).

Conversely, if a user wants to find the max value of a signal for a single capsule, they should first define the capsule using the capsule() function, and then apply maxValue(). For example:

$capsule = capsule('2024-07-19')

$signal.maxValue($capsule)

 

Link to comment
Share on other sites

  • Dan FR changed the title to "No variant of function 'maxValue' consumes the parameters (Signal, Condition)" Error Occurs when using maxValue() to calculate the Maximum Value of a Signal within a Condition

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...