Calculated Metric that counts values based on attribute | Community
Skip to main content

Calculated Metric that counts values based on attribute

  • June 19, 2023
  • 3 replies
  • 0 views

Joe12

I am trying to create a custom metric that counts the number of tickets where a custom attribute is TRUE. 
I created a custom attribute that states: IF (VALUE(First reply time (min)) <= 480) THEN "TRUE" ELSE "FALSE" ENDIF

This works great and I can apply it as a filter on a report and select TRUE or FALSE to show accordingly. 
What I would like to do is create a custom metric that counts the number of TRUE tickets based on that attribute. The reason I don't want to use a filter is that I want to show both the total tickets and the total that are TRUE in the same report. 

The formula I tried is: COUNT_VALUES([First Reply Time SLA Attribute - Low]="TRUE")

This seems to show all tickets, not just the ones where it equals TRUE. 

Is there a formula that will work here? 

3 replies

Joe12
  • Author
  • June 19, 2023

Thank you for the suggestion @ahmed11. The challenge is that I want to have 2 metrics in the report and create a vertical bar graph with a trend line so I can see the number of TRUE tickets as a trend line over the overall number of tickets as the bars. So I don't think this solution will work. 


Joe12
  • Author
  • June 19, 2023

That might be exactly what I needed. Thank you. 


Joe12
  • Author
  • June 19, 2023

@ahmed11 - Another question on this. Is there a way to create a metric that shows the percentage of the count from "IF (VALUE(First reply time (min)) <= 480) THEN [Ticket ID] ENDIF" divided by the number of tickets? 
Say the result of your formula shows 25 but the total tickets for that day was 100. I want a metric that would show 25% instead of just 25. Is that possible?