Create Count Of Users That Opened At Least One Ticket

Answered

6 Comments

  • Official comment
    Joseph Black
    Comment actions Permalink

    Hi Russell,

    I've run into this request before and, believe it or not, the MAQL for generating this kind of metric is pretty simple. Your metric should look something like:

    SELECT COUNT(Users, Ticket Id) WHERE Ticket Status <> Deleted AND User Active = true

    In plain English this is saying, "count the unique number of users from the frame of reference of the Ticket dataset (meaning there needs to be a ticket requested to include that user), excluding users who have submitted only deleted tickets, and only including users who have not been deleted."

    If you're new to creating metrics I'd recommend reviewing the following article: https://support.zendesk.com/hc/en-us/articles/222794107-Creating-custom-metrics-in-Insights.

    Happy reporting!

     

  • Russell Dyas
    Comment actions Permalink

    Hello

     Thank you for the quick reply. Currently getting following error

    Unexpected 'D'. Expecting: ELEM_IDENTIFIER, FUNCNAME1, NEXT, OBJECT, STRING, -, RANKFUNCNAME, IF, PREVIOUS, FUNCNAMEN, COUNT, RUNFUNCNAME, REAL, IDENTIFIER, FUNCNAME2, CASE, FUNCNAME12, PERCENTILE, TEXT_ELEM, THIS, NATURAL, (, IFNULL

    The formula I am using is below..

     

    Any help or advice that you are able to give would be great..

     

    From

    Russell

    0
  • Graeme Carmichael
    Comment actions Permalink

    Russell 

    When creating custom metrics you cannot type the attribute values 'deleted' and 'true'. You must also use the element select tool just as you did with the elements themselves. Look under the 'attribute values' section. 

    0
  • Russell Dyas
    Comment actions Permalink

    Hello

    Thank you both for your help.  That solved the issue and now adding into my report etc.

    Once again thank you for your help.

    1
  • Gadi Vered
    Comment actions Permalink

    The advice from Joseph lists to use the 'users' attribute.

    The example from Russell shows he is using '# users' metric.

    Whilst I can understand the attribute values from this and another explanation by Joseph (thanks again) - I cannot get it to work with # users.

    I cannot see 'users' either, i can see 'user' as a selectable attribute.

    The results i am getting are the number of unique users who opened at least 1 ticket?

    some of the users that I get definitely opened more than 1, but show as 1.

    Is it because I used the 'user' attribute?

    0
  • Amy Dee
    Comment actions Permalink

    Hi Gadi! It looks like there was a typo in Joseph's comment. Sorry about that!

    You figured it out - the attribute is called User, while the metric is called # Users. In this context, you need the User attribute.

    The metric should look like this in the metric editor:

    I created this metric in a test account, and it showed me the number of unique users who created at least one ticket during the reporting period (set by a (Ticket Created) date range).

    Hope this helps!

    0

Please sign in to leave a comment.

Powered by Zendesk