I am unable to set a scalar date value from a query to a local variable. I get the following error:
SYNTAX ERROR
No tabular expression statement found
Query:
let startTime = toscalar(customMetrics
| where timestamp > ago(1d)
| summarize min(timestamp));
I get a result just fine when running just the query:
What am I doing wrong?