Metric Help: 3 Questions
HI,
I have three questions:
1. I'm looking to show tickets created yesterday, but I want it built into the metric itself and not through the filters applied to the attribute.
Dataset: Ticket
IF ([Ticket created - Date] = ?)
THEN [Ticket ID]
ENDIF
I can use "TODAY()" to display today's created, but what can I use to display yesterday?
2. I don't want to include follow-ups in my result. Should I do the opposite of the this article? The only difference is that I dont want to exclude them via a metric filter on a per Ticket ID basis. Just on KPI report that exclude the mfrom the total count.
Ex:
Dataset: Ticket Update
IF [Update channel] != "Closed Ticket")
THEN [Ticket ID]
ENDIF
COUNT(Metric)
Is this correct? I'm getting multiple entries for some Ticket IDs so maybe I should be using D_COUNT here?
3. What is the best way to sum different fields together across Ticket IDs?
Use [Field A] If present OR ([Field B] - [Field C]).
Field A | Field B | Field C | SUM | |
Ticket 1 | 10 | 10 | ||
Ticket 2 | 20 | 15 | 5 | |
Ticket 3 | 5 | 9 | 3 | 5 |
Total | 20 |
Ex:
Dataset: Ticket
IF ([Field A]=NULL)
THEN ([Field B] - [Field C])
ELSE [Field A]
ENDIF
SUM(Metric)
This doesn't seem to working correctly as it's only summing all [Field A] or just all ([Field B] - [Field C]). Should I be using a different function?
-
Hey Alex,
Here are some thoughts:
(1) Check out the function reference for date: https://support.zendesk.com/hc/en-us/articles/360022184834-Explore-functions-reference#topic_rpl_mlf_dhb. I'm not sure if you can do something like Today() - 1 or something to get yesterday.
(2) The same article has a section about operators - you can use the "not euqals" option. https://support.zendesk.com/hc/en-us/articles/360022184834-Explore-functions-reference#topic_mfs_nqf_dhb
(3) If you want to sum results in a new column, you can do that with Result Metric Calculations: https://support.zendesk.com/hc/en-us/articles/360022184374-Using-result-metric-calculations. If you want to do this in your metric, you'd have to figure out how to calculate all three metrics in one metric - you can't reference columns in your query in a metric. You can reference other metrics, but it might not filter how you are in your query, so you'd have to build a metric that brought the three together.
-
Hi Hillary,
1. I reviewed that previously, but did not see an references for "yesterday." I also tried to subtract 1, but it did not work. I'm not sure if there's a different way or certain format so that why I was reaching out with question 1.
2. I did, but the issue was that I was getting multiple entries for a single ID. So I'm wondering if that's due to a ticket getting updated under multiple channels. If so, D_COUNT would be the way to go there then so I only count an ID once regardless of channel it came in.
3. I wouldn't use the results metric calculations as I don't have those metrics in the query.
Maybe I can help explain it better. The Ticket contains all 3 fields. Sometimes all three fields are filled out, other times it's only A or only B and C. For this metric if Field A is present, I want use that number otherwise, I want to use Field B and Field C. I want the metric to decide which number it should use and appear in the SUM column up top.
Please sign in to leave a comment.
2 Comments