Explore - How to regroup low values | Community
Skip to main content

Explore - How to regroup low values

  • July 3, 2024
  • 4 replies
  • 0 views

Nicolas14

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.

4 replies

Zendesk13
  • July 10, 2024

Hi @nicolas14 , 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!


Brandon12
  • July 10, 2024

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


Nicolas14
  • Author
  • July 11, 2024

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
}


Nicolas14
  • Author
  • July 12, 2024

Hi @zendesk13 do you have another solution regarding my previous reply ?

Thanks in advance