Customer Success Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

formula Failure

Liz Lebowitz Jun 08, 2017 08:14AM PDT

I need to create a formula that takes my signal and divides it into capsules that are greater than 14,000 MW for a duration of 6 hours. Every formula I have tried gives me the response back

"Formula Failed: The return type of a formula cannot be changed. Currently this formula produces a Scalar. To produce a Series:Capsule, please close this formula and create a new one. (400)"

Even using the example codes and just changing the variables gets me this error. Any Help would be much appreciated.

Up 0 rated Down
James DeMarco Jun 08, 2017 11:36AM PDT Seeq Corporation Analytics Engineer

Hi Liz,

It sounds like you’re trying to edit a formula for an existing Item. Once the “Formula” tool dialog is executed successfully the first time, an Item is created in the Seeq graph database to store the formula and some metadata/properties. If you take a look at the Details panel, you should see the name you gave the formula item (maybe it’s just “Formula 1”). Just to the left of this will be an icon indicating the type of Item created…I’m guessing yours will look like a graph with a dashed horizontal line through it, which would represent a Scalar item type. You can see item properties by clicking the info “i” to the far left in the Details panel. Currently, this does not show the item type, but if you get the ID from the Item Properties Tool, you can use the Items/{id} API in the API Reference (see the helper menu in the top-right of Workbench) to look up the item and find out all of its properties. One of these will include the Type, which is likely “CalculatedScalar”. If so (or if the icon is as I described), you will want to cancel the “Edit” dialog and click back to “Overview” in the Tools panel, where you can click “Formula” again to create a new formula (instead of editing an existing one). From here you can try again to create the formula of interest.

An alternative approach is to use the “Value Search” tool, which is described as part of this article: Once you have created the value search, you can see how the underlying formula works by once again taking a look at the Item Properties for the resulting item in the Details pane. You will see a “capsulesFromMarkers” function applied to two “markersThreshold” functions. Hope this helps! Please feel free to follow up with me if you have any further questions.

James DeMarco
Seeq Analytics Engineer

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found