question

WyllisMonteiro-6714 avatar image
0 Votes"
WyllisMonteiro-6714 asked WyllisMonteiro-6714 edited

Dynamic userId in kusto query Application Insights

I'm new with Azure Application Insights service, I want to get data from my app (developed with Xamarin Forms, c#) and I need to make a specific query to be able to get a user stats and display it on my Azure Dashboard. I'm able to make this request for all users but not for one user. I show you my query

 customEvents 
 | where name == "LoggedUserEvent"
 | where timestamp > now() - 31d
 | extend Properties = todynamic(tostring(customDimensions.Properties))
 | extend userId = todouble(todecimal(Properties.UserId))
 | where userId == XXX
 | summarize Total = count() by bin(timestamp, 1d)
 | project Total, timestamp

this query work's well and show me Total and timestamp as you can see

185248-capture-decran-2022-03-21-a-163414.png

but the issue it's I should specify

  | where userId == XXX

Each time I want new data about specific user I have to update this line, is there en easier way to get this info using an input text for example or if you have any suggestions, salespeople will use this platform and need to be simple as possible. Thank you in advance


microsoft-graph-insights
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers