I’m trying to create an inline dataview query that does some math on a frontmatter property and returns a number. Works great when the frontmatter property has a number value, and even works if the property is blank, but I can’t get it working if the property doesn’t exist.
Here’s what’s working to pull a number from the property ‘hello’, do some math on it, and return 0 if the property is blank:
`=round( (default(this.hello,0) / 78) * 100,0 )`
When the property ‘hello’ doesn’t exist, I get the error:
“No implementation found for ‘null / number’”
I modified the query to try and prevent the math from happening if the property doesn’t exist, with no success:
`=choice(this.hello = null,0,round( (default(this.hello,0) / 78) * 100,0 ))`
`=choice(!this.hello,0,round( (default(this.hello,0) / 78) * 100,0 ))`
I’ve tried a number of variations on this with no luck. Any ideas on how to just return 0 if the property doesn’t exist?