Get USQL duration results in Seconds or minutes

Hello is there a way to get USQL duration results in Seconds or Minutes instead of “ms”

Thanks

I dont think you can set that in the UI as it will automatically set it as ms/S/Min and so on. You do however have the flexibility to adjust this data in some of the custom charts.

You can modify the resolution of a metric in USQL by manually entering the conversion logic in your query.

HTH

Alonso

Great idea
i think i’ll try that, thanks a lot

Dynatrace can use metric AVG and use mathematic?

“SELECT AVG(duration/1000) FROM usersession”

@AskMe-Solutions  I’ve tried this but it doesn’t work for me. Have you found out any solution to this?

@alonso_decosio This is great but the mathematics operation does not work in this case. for example the below 2 queries doesn’t work. do you have a solution for this?

SELECT name, startTime, AVG(duration/1000) as "Duration in Sec" FROM useraction

SELECT name, startTime, (duration/1000) as "Duration in Sec" FROM useraction
WHERE name = "loading of page /myPage" 
GROUP BY name, startTime, duration
This says - "Math Operations" can not be accessed when using "GROUP BY"!

I stumbled over this today, is this really still not possible?

If I use AVG(DURATION) i can’t divide it to get seconds or minutes, so it displays a session time of 20712ms, which isn’t really great for readability.

Hi

Did you get a chance to find a solution for that? (after this long time :-D)

I’m looking for similar view, as im not able to do mathematical calculation with distinct or aggregated data…

Thanks