If there a way to create USQL query with function (for example - AVG) in WHERE statement?
Sample - a query that returns count of user actions where visually complete time more when average for this user action.
select count(visuallyCompleteTime) FROM useraction where name="%something%" and visuallyCompleteTime > AVG(visuallyCompleteTime)
Solved! Go to Solution.
Did you get a chance to look into the below documentation for the Keywords and functions, also the limitation?
It is not possible to do this with a single USQL query, but it is possible to make this comparison manually between two USQL tiles, or automatically with two API requests.
I'd recommend either creating a dashboard tile with the Avg user action duration as a Single Value, and another with each user action w/visually complete time printed out in a table for comparison.
Or using the USQL API to run both queries outside of Dynatrace, extracting entries from one JSON response that exceeded the average found by the other request's response.