Hey @Yosi_Neuman , I once again find myself trying to do something, finding the same difficulties and looking up answers on the community to find your post
I was trying to do something similar with some query times, and the easiest way I’ve found to do this is just to duplicate the metric and use the “Unit” option to set it to what I needed. So in your case I think you’d remove the ‘tounit’ on the query itself and use the options on the right:
Small community with good guys and information in it 🤗
First of all thanks for the detailed explanation.
In our case customer asks to see downtime from month begin till now.
We calculate a metric that hold a number which is the seconds of downtime from month begin.
We need to show this metric on dashboard in format of D:HH:MM:SS
IMO Because this is a calculate metric, its got no unit assign, hence we do need the toUnit in order to ask dynatrace to show the number in seconds for start.
Had some time to try and reproduce the issue and hope some one can help me here…
Don’t ask how but I figure out that when I use: (1-(builtin:service.response.time)):splitby():setUnit(second) as metric expression the data explorer shows the the output as -8 d -11 h -42 min -40 s
And when I use ((builtin:service.response.time)-1):splitby():setUnit(second) the output is 7.4 d
Hey, maybe for others who run into this. This is a known limitation due to the fact that Dashboards classic and the Data explorer ran on different technologies and used different formatters..
I spare you the details but a thing where we rely on different formatters from the classic part and where we did not have much control over how the formatter reacts on both sides.. So yes indeed whenever you ran auto (did not decide on the way we show time, Data explorer does a better job but it can’t/won’t be used on the Dashboard.
And let me be transparent here. Given the internal dependency and the fact that the investment focus shifted there is no realistic chance we still gonna change that as of today.