POST https://{instance}.domo.com/api/query/v1/functions/template/{beastmodeId}?strict=false
X-DOMO-Developer-Token: YOUR_TOKEN
Content-Type: application/json
{
"expression": "(CASE WHEN (sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END )) = 0) THEN 0 ELSE ((sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < 28) AND (DateDiff(Current_Date(),`Date`) > 0)) THEN `Orders` END )) - sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) / sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) END )"
}{
"id": 232,
"name": "% Change - Orders",
"owner": 27,
"locked": true,
"global": false,
"expression": "(CASE WHEN (sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END )) = 0) THEN 0 ELSE ((sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < 28) AND (DateDiff(Current_Date(),`Date`) > 0)) THEN `Orders` END )) - sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) / sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) END )",
"checkSum": "4041d1731163b41ae86552ebb46f8a2f1d5aecd5",
"links": [
{
"resource": {
"type": "DATA_SOURCE",
"id": "32e6af61-c725-487a-8a4a-a46fbfed9fb1"
},
"visible": true,
"active": false,
"valid": "VALID"
}
],
"legacyId": "calculation_6ca6ab70-412a-4394-82d7-d6f648758907",
"lastModified": 1734532686486,
"created": 1654190830737,
"aggregated": true,
"analytic": false,
"nonAggregatedColumns": [],
"dataType": "DECIMAL",
"status": "VALID",
"cacheWindow": "day",
"columnPositions": [
{
"columnName": "`Date`",
"columnPosition": 67
},
{
"columnName": "`Date`",
"columnPosition": 123
},
{
"columnName": "`Orders`",
"columnPosition": 149
}
],
"functions": [
"DOMO_OP_MULTIPLY",
"ADDDATE",
"DOMO_OP_ADD",
"SUM",
"DOMO_OP_SUBTRACT",
"DATEDIFF",
"DOMO_OP_DIVIDE"
],
"functionTemplateDependencies": [],
"archived": false,
"hidden": false,
"variable": false
}Update the formula that consitutes the calculation in the Beast Mode.
POST https://{instance}.domo.com/api/query/v1/functions/template/{beastmodeId}?strict=false
X-DOMO-Developer-Token: YOUR_TOKEN
Content-Type: application/json
{
"expression": "(CASE WHEN (sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END )) = 0) THEN 0 ELSE ((sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < 28) AND (DateDiff(Current_Date(),`Date`) > 0)) THEN `Orders` END )) - sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) / sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) END )"
}{
"id": 232,
"name": "% Change - Orders",
"owner": 27,
"locked": true,
"global": false,
"expression": "(CASE WHEN (sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END )) = 0) THEN 0 ELSE ((sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < 28) AND (DateDiff(Current_Date(),`Date`) > 0)) THEN `Orders` END )) - sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) / sum((CASE WHEN ((DateDiff(AddDate(Current_Date(),-1),`Date`) < (28 + (52 * 7))) AND (DateDiff(Current_Date(),`Date`) > (52 * 7))) THEN `Orders` END ))) END )",
"checkSum": "4041d1731163b41ae86552ebb46f8a2f1d5aecd5",
"links": [
{
"resource": {
"type": "DATA_SOURCE",
"id": "32e6af61-c725-487a-8a4a-a46fbfed9fb1"
},
"visible": true,
"active": false,
"valid": "VALID"
}
],
"legacyId": "calculation_6ca6ab70-412a-4394-82d7-d6f648758907",
"lastModified": 1734532686486,
"created": 1654190830737,
"aggregated": true,
"analytic": false,
"nonAggregatedColumns": [],
"dataType": "DECIMAL",
"status": "VALID",
"cacheWindow": "day",
"columnPositions": [
{
"columnName": "`Date`",
"columnPosition": 67
},
{
"columnName": "`Date`",
"columnPosition": 123
},
{
"columnName": "`Orders`",
"columnPosition": 149
}
],
"functions": [
"DOMO_OP_MULTIPLY",
"ADDDATE",
"DOMO_OP_ADD",
"SUM",
"DOMO_OP_SUBTRACT",
"DATEDIFF",
"DOMO_OP_DIVIDE"
],
"functionTemplateDependencies": [],
"archived": false,
"hidden": false,
"variable": false
}Documentation Index
Fetch the complete documentation index at: https://domoinc-arun-raj-connectors-domo-479695-remove-crime-report.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Domo Developer Token for authentication
The ID of the Beast Mode to update
Strict mode flag
The text formula to update
Successful response
The response is of type object.