Using Now in dashboard queries
I'm trying to display a table of the time since last event grouped by various parameters
select Round(TotalMilliSeconds(Now() - max(@Timestamp)) / (1000 * 3600), 0) as HoursSinceLastEvent
group by Tenant, Application, StockImportName, StockExportName
order by HoursSinceLastEvent
And while this works great in the query editor, it doesn't work as a table dashboard widget, with the error message "The `for window()` directive cannot be applied to this query because of embedded temporal clauses."
Somehow weirdly, it works as a line/bar/point graph, but not as a table. If I display @Timestamp instead of calculating the time since timestamp it works as a table
Posted by Tore Birkeland almost 2 years ago