User session query

Unfortunately using the “E” input sorts the days alphabetically. There are a few things we can do to get closer to the display that you are looking for, but unfortunately it is not possible to sort days by days of the week on a rolling scale that considers what day it currently is. This would be a good thing to put in an RFE, to possibly put into Dynatrace at a later date.

I can think of 2 workarounds for this.

  1. Instead of using "DATETIME(starttime, “E”, “1d”) " use "DATETIME(starttime, “e”, “1d”) ". This will display the days of the week as numbers as opposed to the spelled out day of the week. Meaning when sorted it will always display the days in order Sunday-Saturday. This may be a bit confusing when the current day is in the middle of the week, and being displayed in the middle of the chart.
  2. You could also change the query to include MIN(starttime) like below:
SELECT DATETIME(starttime, "E", "1d"), AVG(duration), MIN(starttime)<br>FROM useraction <br>WHERE name is "reprise de devis"<br>GROUP BY DATETIME(starttime, "E", "1d")<br>ORDER BY MIN(starttime)

If you use this, the results will be displayed sorted by week day, and on a rolling scale that considers the current day. The drawback of using this method, is that it will add in 2 bars to the chart for each day, displaying “MIN(starttime)”

Cheers,

Jonathan