Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

Count rows and show un a table

Hi,

How do i get this count in a table 

Data

Name, Manager,ID,Class,Position 

John,james,1,art,student

Dan,james,2,art,student

James,simon,3,art,teacher

Tony,peter,4,art,student

I need to count by position, how many Name and Manager have the same Class, 

So group 1 is Class Art John and Dan share a class with their Manager, so I want to show John, Dan and the Manager James.

Table

Class,Position,Total

art,student,2

art,teacher,1

 

Table 2

ID,Name,Class,Count

1, john,art,1

2, Dan,art,1

3,James,art,1

 

Thanks much appreciated 

 

Labels (1)
8 Replies
vinieme12
Champion III
Champion III

 

 


temp:
load * inline [
Name,Manager,ID,Class,Position
John,james,1,art,student
Dan,james,2,art,student
James,simon,3,art,teacher
Tony,peter,4,art,student
];

Result:
load Class as class,Manager as manager,Position as position,count(Name) as namecount
Resident temp
Group by Class,Manager,Position;

exit script;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
D19PAL
Creator II
Creator II
Author

That doesn't work.

This is the outcome im looking for

Class,Position,total

Art, Student, 2

Art, Teacher,1

This is because Name and Manager both have Class = Art, so count both student John and Dan ID 1 and 2 and James the Teacher ID 3.

 

 

 

 

 

D19PAL
Creator II
Creator II
Author

Any help on this please.

sidhiq91
Specialist II
Specialist II

@D19PAL  Will something like below help?

sidhiq91_0-1663940485173.png

 

D19PAL
Creator II
Creator II
Author

No.

The outcome needs to be as follows 

Class,Position,Count

Art, Teacher,1

Art, Student,2

Count 1 = id3

Count 2 = id1 and id2.

These three id's name and manager share the same class and i want to show all three by position.  Id4 doesn't have the same class as anyone so is exculded.

 

Thanks 

 

 

D19PAL
Creator II
Creator II
Author

I'm still trying to do this, any help much appreciated.

 

Thanks

D19PAL
Creator II
Creator II
Author

@maxgro 

Thanks for your earlier help, this is what im trying to do but can't get it to work.  The previous post where you helped was a part of this.

 

Help with this will be great.

 

Thanks

 

D19PAL
Creator II
Creator II
Author

This is the original request i need help with.

https://community.qlik.com/t5/New-to-Qlik-Sense/Count-rows-and-show-un-a-table/m-p/1985234#M214813

 

Thanks much appreciated, i just can't get it to work.