Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
mrm
Contributor
Contributor

Count function

Any help please with an expression to count the Subject IDs for each Student ID

 

Student IDSubject ID
12390A
12345B
12323C
22312B
22334H
33356J
33378U
33390A

 

The output should be like

Student IDCount of Subject ID
1233
2232
3333

 

Thanks,

MRM

3 Replies
Marcos_rv
Creator II
Creator II


TABLE:

LOAD * INLINE [
Student ID,Subject ID
123 ,90A
123 ,45B
123, 23C
223, 12B
223, 34H
333 ,56J
333 ,78U
333 ,90A ];

 

TABLA2:
LOAD [Student ID],
COUNT([Student ID]) AS [Count of Subject ID]
RESIDENT TABLE

GROUP BY [Student ID];

 

mrm
Contributor
Contributor
Author

Many Thanks for the reply, but the data provided was a sample to put forward the question. Actually, these are two (Student ID and Subject ID) columns from a data source and are in a Table chart, and the count of Subject ID has to be included as dimension in the Table chart. Any help for this. I just started with Qlik Sense. Thanks
dplr-rn
Partner - Master III
Partner - Master III

Why dont you add a measure like
Count(Subject ID)
Dimension - [Student ID]

is there something which complicates such an approach?