Skip to content

Instantly share code, notes, and snippets.

@rossbelmont
Last active February 19, 2022 18:47
Show Gist options
  • Save rossbelmont/d6fe5abb0c7cb3be8eccbe88d7979ba1 to your computer and use it in GitHub Desktop.
Save rossbelmont/d6fe5abb0c7cb3be8eccbe88d7979ba1 to your computer and use it in GitHub Desktop.
Qualifier for Percentage Formulas
// First attempt
Employees: {
"CertaintyScore": { // This is the value in DynamoDB
"value":"CertaintyPerc/100" // 70 → 0.7
},
"CertaintyPerc: {
"presence":"derived", // Derived, not in DynamoDB
"value":"CertaintyScore*100" // 0.7 → 70
}
}
// Escaped formulas also do not work
Employees: {
"CertaintyScore": {
"value":"CertaintyPerc\/100" // Escaped
},
"CertaintyPerc: {
"presence":"derived",
"value":"CertaintyScore\*100" // Escaped
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment