Explore recipe: Time over time percentage change for a custom dropdown ticket field

Return to top

5 Comments

  • Taylor Bowser
    Zendesk Customer Care

    Hi pstrauss, 

    You can duplicate the default COUNT(Tickets) metric and add it to your report. Then you can go to result manipulation>>result path calculation and select Pattern = % of total on rows for the duplicate metric as shown below:

    Hope this helps!

    1
  • PAUL STRAUSS

    Ahh, thanks, Taylor. That's helpful!

    0
  • Louise Dissing

    Hi!

    I followed this recipe and, unfortunately, I found an error!
    When there's nothing to count (eg. no tickets created last month), it won't return with '0' or NULL, and the calculations will be wrong or empty.

    Try to look at this:

    Have anyone encountered this issue and solved it?

     

    Thanks! :-)

    1
  • Rob Stack
    Zendesk Documentation Team

    Hi Louise, thanks for the question. I've opened a ticket on your behalf so we can investigate what's going on. I'll them make any necessary updates to the article. You should hear from someone soon. Thanks!

    -1
  • BA

    The article states that the percent change is calculated by:

    (COUNT(Tickets created this month)-COUNT(Tickets created last month)) /COUNT(Tickets created this month) 

    It should in fact be calculated by:

    (COUNT(Tickets created this month)-COUNT(Tickets created last month)) /COUNT(Tickets created last month). 

    Based on the formula stated in the article, if I had 1 ticket last month and 1000 tickets this month, it would show a 99.9% increase in tickets.  But a 100% increase means a doubling of the number of tickets, not a 1000x increase in the number of tickets.

    Additionally, the screenshot in step 14 shows 48,686 tickets this month and 79,883 tickets last month, with a change of 60.95%.  It appears the formula used to calculated the % change in that image is just (# tickets this month)/(# tickets last month), which is also incorrect, but a different sort of incorrect compared to Step 10.

    The comment by Louise Dissing demonstrates not a problem with Zendesk, but just the mathematical reality of having 0 in the denominator, which is not really a legal operation.  

    Our method of dealing with that was just to "pretend" that there was actually 1 ticket in the previous period when calculating the percentage increase using the following:

    IF (COUNT(Tickets created last week)>0) 
    THEN 
    ((COUNT(Tickets created this week)-COUNT(Tickets created last week) ) /COUNT(Tickets created last week) )
    ELSE 
    COUNT(Ticket created this week)
    ENDIF

    So going from 0 tickets to 3 tickets shows a 300% increase - mathematically, that's completely wrong, but for our use case, it's fine, and it's more helpful than displaying nothing at all.

    0

Please sign in to leave a comment.

Powered by Zendesk