Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
vimalthehero
Contributor III
Contributor III

Count similar category presence

dear team, 

im trying to achieve a special counting logic to find similar category present in an other columns

here is the input and desired output needed.

can someone suggest some ideas to acheive it.?

 

INPUT
SPORTS GROUP
FOOTBALL FOOTBALL;CRICKET;
CRICKET CRICKET;VOLLEYBALL;
VOLLEYBALL VOLLEYBALL;
  CRICKET;FOOTBALL;
  CRICKET;
  FOOTBALL;

 

OUTPUT
SPORTS COUNT SPORTS PRESENCE
FOOTBALL 3
CRICKET 4
VOLLEYBALL 2

 

SPORT.JPG

Labels (3)
1 Solution

Accepted Solutions
aguirre
Creator
Creator

you could do:


GROUPS:
Load * Inline
[
GROUP
FOOTBALL;CRICKET
CRICKET;VOLLEYBALL
VOLLEYBALL
CRICKET;FOOTBALL
CRICKET
FOOTBALL
];

SPORTS:
LOAD
SubField(GROUP,';') as SPORT
Resident GROUPS;

DROP TABLE GROUPS;

 

and then with Count(Sport) you get the number of sport like in the picture

 

View solution in original post

1 Reply
aguirre
Creator
Creator

you could do:


GROUPS:
Load * Inline
[
GROUP
FOOTBALL;CRICKET
CRICKET;VOLLEYBALL
VOLLEYBALL
CRICKET;FOOTBALL
CRICKET
FOOTBALL
];

SPORTS:
LOAD
SubField(GROUP,';') as SPORT
Resident GROUPS;

DROP TABLE GROUPS;

 

and then with Count(Sport) you get the number of sport like in the picture