Creating a calculated attribute: Combining Multiple Attributes | Community
Skip to main content

Creating a calculated attribute: Combining Multiple Attributes

  • September 14, 2023
  • 0 replies
  • 0 views

Wil12

This is a bit of a tricky one. Instead of using a multi-select field, to limit the number of options selected to three by request of the business, we have created three custom attributes with identical values (and obviously different tags). When it comes to reporting, we want to join the identical values across all three custom attributes, allowing for a ticket to be counted multiple times. Thus far in explore I have failed to successfully built a report that shows the number of tickets for each.

Sample attributes:

Field 1: value 1 (tag:value1_f1), value 2 (tag:value2_f1), value 3 (tag:value3_f1)

Field 2: value 1 (tag:value1_f2), value 2 (tag:value2_f2), value 3 (tag:value3_f2)

Field 3: value 1 (tag:value1_f3), value 2 (tag:value2_f3), value 3 (tag:value3_f3)

When I attempted to use an 'INCLUDES_ANY' calculated attribute along with the metric of COUNT(Tickets) I only get the count for what I'm guessing is the first result, it's not allowing a ticket to be double counted for more than one merged value.

Sample calculation:

IF (INCLUDES_ANY([Ticket tags], "value1_f1", "value1_f2", "value1_f2")) THEN "value 1"
ELIF (INCLUDES_ANY([Ticket tags], "value2_f1", "value2_f2", "value2_f3")) THEN "value 2"
ELIF (INCLUDES_ANY([Ticket tags], "value3_f1", "value3_f2", "value3_f3")) THEN "value 3"
ELSE "Other"
ENDIF

I also tried a simple IF/THEN with the fields, with the same result:

IF [Field 1]="value 1" THEN "value 1"
ELIF [Field 2]="value 1" THEN "value 2"....

I even tried playing around with an ATTRIBUTE_ADD function in an calculated metric, but that didn't seem to help.

We understand we may need to use a multi-select field instead, but can anyone help come up with a solution where tickets can get multi-counted for each value it come up via the three fields.

Many thanks that you made it this far!