Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
JulienCha
Contributor
Contributor

Hos to create a table with a column that count a number of entries with a string in common ? Aggr ?

Sorry for my english, i'm a beginner both with English and Qlik.

From my table, i would like to extract a new form of my table. I want to count the numer of 'Ticket' wich have a part of the text of 'Objet du Ticket' in common. Then, i also want to display a list of 'N° Ticket' that are associated.

Here is the example :

N° TicketObjet du ticket
1TELEP_TAC_MOUNI_terou
2COMPT_RTC_POULA_gadeu
3COMPT_RTC_BIDOU_gende
4ROR_PDH_CAILLU_juldij
5ROR_PDH_BIDOU_judisl
6COMPT_RTC_POULA_juhed
7TELEP_TAC_MOUNI_hdysu
8TELEP_TAC_MOUNI_ferdu
9COMPT_RTC_CARLO_deuse
10COMPT_RTC_CARLO_juede

 ==>

N° TicketObjet du ticket tronquéNombre de tickets
1;7;8TELEP_TAC_MOUNI3
2;6COMPT_RTC_POULA2
9;10COMPT_RTC_CARLO2
3COMPT_RTC_BIDOU1
4ROR_PDH_CAILLU1
5ROR_PDH_BIDOU1

 

Thank you

5 Replies
AdiPai
Creator II
Creator II

Hey Julien ,

 

You can try this using the concat function - 

AdiPai_0-1610612227386.png

Thanks

Adi

Ksrinivasan
Specialist
Specialist

HI,

YES,  CONCAT(Ticket_Num),';')   he wants in his result separated by ;,

 

 

JulienCha
Contributor
Contributor
Author

And how can I count the number of [N°ticket]  with identical Objet du ticket tronqué ?

Where [Objet du ticket tronqué]  is not a defined dimension but a formula in a dimension wich is :

If(Wildmatch([Objet du ticket],'*_*') And Wildmatch([Objet du ticket],'*-*'),Left([Objet du ticket],index([Objet du ticket],'-',3)-1),
If (Wildmatch([Objet du ticket],'*_*'),(Left([Objet du ticket],index([Objet du ticket],'_',3)-1)),(Left([Objet du ticket],index([Objet du ticket],'-',3)-1)))

AdiPai
Creator II
Creator II

@JulienCha  - it would be better if you can create this as a new feild in the script than write a caclulated dimension ..  i guess just removing the 6 right chars from Objet du ticket should give you  Objet du ticket tronqué

ex - LEFT(TELEP_TAC_MOUNI_hdysu,15) will give you = TELEP_TAC_MOUNI

RayArina
Contributor III
Contributor III

Hi @JulienCha 

Try this

Dimension - left (PurgeChar(Objet_du_ticket, SubField(Objet_du_ticket, '_', -1)), len(PurgeChar(Objet_du_ticket, SubField(Objet_du_ticket, '_', -1)))-1)

Expression 1 - Concat([N°Ticket], ';')

Expression 2 - count([N°Ticket])

123.jpg