Forum Discussion
dahund79
Feb 03, 2020Copper Contributor
unable to use let in log analytics query "No tabular expression statement found"
Creating a simple variable using let fails with "No tabular expression statement found" my code,
let myvar=4;
why can i not do this
- https://ms.portal.azure.com#@72f988bf-86f1-41af-91ab-2d7cd011db47/blade/Microsoft_Azure_Monitoring_Logs/DemoLogsBlade/resourceId/%2FDemo/source/LogsBlade.AnalyticsShareLinkToQuery/q/H4sIAAAAAAAAA8tJLVHIrSxLLLI1seZyLUvNK%252BGqUSgoys9KTYZKcAEAlbG6ViMAAAA%253D/timespan/P1D
let myvar=4;
Event
| project myvar
This works, what are you trying?
5 Replies
- ScottAllisonIron Contributor
dahund79 Can you be more explicit? How are you using 'myvar' in the query?
- dahund79Copper ContributorHey, i am not Really using it just trying to create a variable, for testing.
- ScottAllisonIron Contributor
dahund79 Simply declaring the variable will fail since it's not being used in a query. CliveWatson 's example above shows how to potentially use the variable in a query.