Writing Explore formulas

Return to top
Have more questions? Submit a request

15 Comments

  • Quentin

    How do you use Attribute values?

    For example I want to filter a certain value of an attribute (filter out deleted tickets), in GoodData it looked like this: "Ticket Status <> Deleted"

    0
  • Molly
    Zendesk Customer Success

    Hey Quentin!

    Deleted tickets are already excluded from the Support Tickets dataset so any metrics you make there do not need any additional modifications. If you use the Ticket Updates dataset, deletion events will be included there.

    0
  • Quentin

    Thanks Molly for the explanation.

    But how do you filter by status for example? If I want to see only open tickets in my metric? Something like [Ticket Status]=Open?

     

    0
  • Rob Stack
    Zendesk Documentation Team

    Hi Quentin, there are two options.

    1. Without a custom metric. Add the Ticket Status attribute to a panel and then click it. You can include, or exclude the values you want. In your case, you’d select only Open.

    2. Use a custom attribute. You are correct, in your suggestion, but you do need quotes, for example:

    [Ticket Status]="Open"

     

    Hope this helps!

    1
  • Quentin

    Perfect Rob!

    Thanks for the tip :)

    0
  • Paul Stolz

    How can I create a formula to show the end-user phone number in a Query? Currently, there is a row value for End-user email, but not for end-user phone number. 

    0
  • Graeme Carmichael
    Community Moderator

    Paul

    Unfortunately the user's phone number is not part of the dataset so you cannot report on it using Explore.

    In Support, you would have to copy the phone number into a custom user field and then use the custom field in Explore.

    0
  • Gef Faelden

    Can you add a comment in your calculated field/metric?

    0
  • Devan - Community Manager
    Zendesk Community Team

    Hello Gef Faelden,

    My recommendation would be to use a datatip to accomplish this. I've shared a link below to an article that explains how to implement these and its range of uses.

    Working with datatips

    Best regards. 

    0
  • CS Analyst

    Hi,

    Comparing to the Insights, how to express metric formula with this logic in Explore?

    I can find the Ticket Tags in Fields but I can't find the tag "category_id_175" that i need.

    Regards.

    0
  • Madison Davis
    Zendesk Community Team

    Hi there! I think you'll want to look at Reporting on ticket tags in Explore for help writing this metric. 

    Specifically, you could write a standard calculated metric with the following formula:

    IF ([Ticket tags]="category_id_175") THEN [Ticket ID] ENDIF

    Then filter your query for date ticket created. Unlike in Insights, you can just type the entire formula rather than selecting elements from a menu. Additionally, you can report on this ticket tag without a custom metric, as outlined in the first article on reporting on ticket tags. 

    0
  • David Spies

    I used to have several custom metrics in insights that gathered categories and their sub-categories and listed them as single item to be used in some pie charts.

    For example we have a root category called business process and I want to count any tickets that fall within that category.  the tags are business_process, business_process::requests, business_process::requests::email, etc

    I cannot seem to find a way to duplicate the insights expression below:
    SELECT # Tickets WHERE Custom Attribute Label Category [list] [Category] LIKE "%BUSINESS_PROCESS%"

    Any help would be greatly appreciated.  Thanks!

    0
  • Madison Davis
    Zendesk Community Team

    Hey David! I think you're looking for the recipe here: Explore recipe: Reporting on nested drop-down fields

    1
  • David Spies

    Hi Madison,

    I tried what you suggested in your link, and I was certainly able to create a new query that combined the nested fields into a single item.  Thank you.  My trouble now is that I'm unable to combine multiple of these similar queries into a single pie chart.  Essentially I want to create a pie chart that lists all of the tickets for every category and their nested drop-down lists, but have each separate category represented by a single number.  See the image below for an idea:

    In the past I did this with a custom metric, so how do I do this now with a query instead?

    Thanks for any guidance you can provide!

    0
  • Madison Davis
    Zendesk Community Team

    Got it, thanks David, and sorry for the delayed response! I actually recommend using an Attribute Group instead if you just want to report on the level one nest of the field. 

    0

Please sign in to leave a comment.

Powered by Zendesk