Recent searches


No recent searches

Explore - How to regroup low values



Posted Jul 03, 2024

Hi,

I've made a report which does count the number of tickets per values of an attribute.

There's a lots of low values like 1 or 2 and I would like to regroup them in a new value “Various” of this attribute (so instead of having X lines with 1 I would have one “Various” line with the sum X)

 

How can I achieve this ?

 

Regards.


0

4

4 comments

image avatar

Pedro Rodrigues

Community Moderator

Hi Nicolas Monchaux , try using the following standard calculated attribute, for example:

IF ATTRIBUTE_FIX(D_COUNT(Tickets), [Your Custom Field]) <= 2 THEN
  "Various"
ELSE
  [Your Custom Field]
ENDIF

Additionally, consider filtering your attribute in order to exclude NULL values.

Hope this helps!

1


image avatar

Brandon (729)

Zendesk LuminaryUser Group LeaderThe Humblident Award - 2021Community Moderator

Another approach here would be IF [Your Custom Field] = “1” OR [Your Custom Field] = “2” THEN “Various” ENDIF

0


Thank you, it is partially working

Example of my data

[Custom Field 1] have values :

A = 3

B = 1

C = 2

[Custom Field 2] have values :

D = 1

E = 1

B = 2 (I can have the same value in different Custom Fields)

I've merged those two fields with a SWITCH function so I have

A = 3

B = 3

C = 2

D = 1

E = 1

With the ATTRIBUTE_FIX inside each CASE of the SWITCH I obtains

A = 3

Various = 7 (containing B C D E)

B shouldn't be included in Various but it is because in each custom field the value is lower or equal 2

 

Since I can't use calculated attributes inside ATTRIBUTE_FIX or use the SWITCH directly inside the ATTRIBUTE_FIX I'm a bit stuck

 

Here's my current “partially working” solution" (the hierarchy is [FR-Ebiz-Type] > [FR-Ebiz-Outil] > all 3 Page attributes)

SWITCH ([FR-Ebiz-Outil]) {
   CASE "Punch out":     IF (ATTRIBUTE_FIX(D_COUNT(Tickets), [FR-Ebiz-Type], [FR-Ebiz-PagePunchOut]) <= 2) THEN
       "Various"
   ELSE
       [FR-Ebiz-PagePunchOut]
   ENDIF
   CASE "Scanner":     IF (ATTRIBUTE_FIX(D_COUNT(Tickets), [FR-Ebiz-Type], [FR-Ebiz-PageScanner]) <= 2) THEN
       "Various"
   ELSE
       [FR-Ebiz-PageScanner]
   ENDIF
   CASE "Catalogue Statique":     IF (ATTRIBUTE_FIX(D_COUNT(Tickets), [FR-Ebiz-Type], [FR-Ebiz-PageCatStatique]) <= 2) THEN
       "Various"
   ELSE
       [FR-Ebiz-PageCatStatique]
   ENDIF
}

0


Hi Pedro Rodrigues do you have another solution regarding my previous reply ?

Thanks in advance

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post