Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

How can I count the number of appearances of a record in the loading script?

Hello guys,

I have a problem like this :

load * inline [

id description

10 hello1

10 hello1

10 hello1

10 hello1

20 hello1

];

And I want to calculate how many times has the id number repeated. Somethink like :

ID counter
10 4

20 1

Anybody knows how can I do that?

Many thanks in advance.

11 Replies
Not applicable

what was your exact syntax? You need to specify what to group by

e.g. count(*) group by id should do the trick

if you just count(id) you will get the grand total of all ids

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thank you all of you. It was something stupid, just adding the group by clause and that's it, but I'm gonna try the fieldvaluecount function too.

Many thanks in advance.