Retrieve the portal time span and use it inside the kusto query
I am trying to access the time range selected from portal and use it inside the kusto query to show some metric (% uptime of a specific api using our custom logic).
Documents does not mention any variable or function that we will help to access the time range selected from portal.
It would be helpful to have a magic variable to see the time range selected from portal.
Thanks for the valid suggestion. Your feedback is now open for the user community to upvote & comment on. This allows us to effectively prioritize your request against our existing feature backlog and also gives us insight into the potential impact of implementing the suggested feature.
Daniel Pupek commented
I was surprised to find this missing.
Joe Sheldon commented
This would be very helpful for creating consistent dashboards.
I've created a graph (using a log query) that shows processing counts summarized by hour for an integration . I would like to use the make-series operator (or union with range, etc.) to include all points (defaulting to zero) in the time range specified in the Azure portal dashboard.
Unfortunately, I have no way within the query to get the time range specified in the dashboard, so either: 1) I hard-code a time range for make-series resulting in the graph having a different time range than everything else on the dashboard, or 2) I don't use the make-series and instead rely on the output of "summarize ... by bin(timeStamp 1h)". For option 2, I end up with the line above zero where it should be at zero which is visually misleading.
Please add this functionality so I can create graphs that behave the same way that the Azure-supplied dashboard graphs behave.
Andrew Hathaway commented
I would like to be able to do this for the dashboards I am creating!
Parkavi Kabilathas commented
Is this feature implemented now?
Can't understand why this one is not yet implemented for me this is fundamental. You can get events with min an max timestamp to approximate the range but this workaround is not always helpful. Let's say you want to compute percentage of users sessions activity in selected range. You really can't get the range you selected so this is not achievable.
There is one terrible thing with charting too. The x line is limited to first and last event and not to the selected time range, you may end up getting messed time ranges on the dashboard. I expect that when a time range is selected you see this time range on the chart. Instead you get irritating zoom on timeline so hurting for the eyes.
Azure was released years ago but beware it is still in beta
David McCann commented
This would be very useful if we have parameters that we want to change. For example if we are trying to limit the results by the count, for 7 days this should be different than for 24 hours.