Calculated Metric OR statement | Community
Skip to main content

Calculated Metric OR statement

  • January 16, 2024
  • 4 replies
  • 0 views

Brandi11

I need a report to show a D_count(Solved tickets), but exclude any ticket IDs that include at least one of multiple ticket tags.

For example:
I want to exclude the Ticket ID if one or more of the tags includes "closed_by_merge" or "spam" or "voice_abandoned_in_queue".

Ticket ID 1 has tags: "closed_by_merge", "provider", and "other_service"
Ticket ID 2 has tags: "voice_abandoned_in_queue", "oos", and "csat_off"
Ticket ID 3 has tags: "problem" and "tv"

Results should only show 1 Ticket (ticket ID #3)

I found a starting point from Don Moser, but I'm looking for a way to add an OR statement. I tried to use ||, but got an error on the format check. Does anyone know how I can include multiple tag options in the below formula?

IF (NOT INCLUDES_ANY([Ticket tags], "tag1")) THEN [Ticket ID] ENDIF


Source: https://support.zendesk.com/hc/en-us/articles/5798713981978-How-do-I-exclude-tickets-with-a-specific-tag-from-reports

4 replies

Luiz16
  • January 17, 2024

@brandi11

Try this >>

IF (NOT INCLUDES_ANY([Ticket tags], "tag_1","tag_2","tag_3"))
THEN [Ticket ID]
ENDIF

Source: https://support.zendesk.com/hc/en-us/articles/4408838151450#topic_odw_2ns_lvb


Brett13
  • Community Manager
  • January 17, 2024

Thanks for sharing this solution @luiz16!


Brandi11
  • Author
  • January 18, 2024

It looks like that was the solution I needed. I was making it way too complicated. Thank you!


Luiz16
  • January 19, 2024

Glad to help!!