none
Need to display crash-free users from data, exported from appcenter

    Question

  • Hi there,

    I'm fairly new to this whole analytics thing, so i hope you can hint me in the right direction.

    I want to display all crash-free users of my app, compared to the overall amount of users per day over the last month.
    So my basic idea is to get the number of users without crashes per session per day, get the number of all users per sessions per day, calculate the percentage and let it be shown in a nice chart.

    So far i found out, how i can get the tings i want either for all users, or for all crash free users.

    crashfree users:

    customEvents
    | where timestamp > ago(30d)
    and name != "UnhandledErrorLog" and client_OS contains "Android" and application_Version == 4.1812
    | project client_OS, client_Model, customDimensions, user_Id, application_Version 
    | extend AppBuild = parsejson(tostring(customDimensions.AppBuild) ) 
    overall users:
    customEvents
    | where timestamp > ago(30d)
    and client_OS contains "Android" and application_Version == 4.1812
    | project client_OS, client_Model, customDimensions, user_Id, application_Version 
    | extend AppBuild = parsejson(tostring(customDimensions.AppBuild) ) 
    But how do i marry those two requests to get what i want presented in a
    beautiful chart and being able to maybe sort by clientModel or user_Id or
    stuff like that?

    Thx in advance,
    Maverick





    • Edited by Maverick1st Thursday, December 20, 2018 1:20 PM
    Thursday, December 20, 2018 1:13 PM

All replies

  • Hi Maverick,

    Thank you for using Appliction Insights. In order to marry the two requests you can use Joins in Log Analytics queries. You can

    Here is a sample query that you can make use of. You can further modify it to suit your requirements:

    customEvents 
    | where timestamp > ago(30d)
    and name != "UnhandledErrorLog" and client_OS contains "Android" and application_Version == 4.1812     // crash free
    | project client_OS, client_Model, customDimensions, user_Id, session_Id, application_Version
    | join kind= inner (
        customEvents 
        | where timestamp > ago(30d)
          and client_OS contains "Android" and application_Version == 4.1812     // all users
        | project user_Id, session_Id
        | summarize CrashFree=dcount(user_Id) by session_Id
        | where CrashFree > 1
    ) on session_Id
    | summarize AllUsers=dcount(user_Id) by session_Id
    | where AllUsers > 1
    You can use a bunch of aggregations like count(), avg(), etc. You can refer to this document for more details.


    Saturday, December 29, 2018 12:38 PM
    Moderator
  • Hey there,

    Thx for the answer. Thats what i somehow tried first, but failed. Unfortunately your Query did not provide the results i needed. 
    Thats why i tried another approach:

    customEvents
    |where timestamp > ago(7d)
    | project client_OS, user_Id, application_Version, name, timestamp
    | extend AllEventsAndroid = iff(client_OS contains "Android" and application_Version == 4.1812, 1, 0) 
    | extend Android = iff(name != "UnhandledErrorLog" and client_OS contains "Android" and application_Version == 4.1812, 1, 0)
    | extend AllEventsIOS = iff(client_OS contains "iOS" and application_Version == 4.1812, 1, 0) 
    | extend iOS = iff(name != "UnhandledErrorLog" and client_OS contains "iOS" and application_Version == 4.1812, 1, 0)
    | extend Time = bin(timestamp, 1d)
    | distinct AllEventsAndroid, Android, AllEventsIOS, iOS, user_Id, Time
    | summarize    
        Android = round((countif(Android == 1) * 100.0 ) / countif(AllEventsAndroid == 1), 2),
        iOS = round((countif(iOS == 1) * 100.0 ) / countif(AllEventsIOS == 1), 2)
        by Time
    | render timechart

    This does exactly what I need, with one small drawback.
    The values are not displayed as percent values but as double values with precision of two.
    How can i change my request to get the y axis have display percentage instead of double?

    Tuesday, January 8, 2019 3:59 PM