Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ishilad
Contributor
Contributor

Counting Feature

Hi I have a quick question.

I am currently working on a sheet with a series of projects listed. Each project has a number of people working on it. I have the project names and the people who are working on them as Dimensions on a pivot table. I need to add a column that allows me to count how many people there are working per project. I tried using the aggr() function, if statements, in addition to a few other features. I cannot seem to figure out how to do this. 

15 Replies
dplr-rn
Partner - Master III
Partner - Master III

can you give a sample of output you need?

shot in the dark did you try Total<People>

 

Ishilad
Contributor
Contributor
Author

Sure. I attached a photo of a sample I created. Shown are the Projects and next to it are the names of the people on each project. I need something that will count that there are 2 people in the first project or five people in the second project.

dplr-rn
Partner - Master III
Partner - Master III

Columns are Just project and number of resources?
Ishilad
Contributor
Contributor
Author

The columns are Project Name, Total Hours spent on each project, and name of resource

dplr-rn
Partner - Master III
Partner - Master III

wheres the count?
Ishilad
Contributor
Contributor
Author

The highlighted cells are what I need. I don't have a count of how many people are working per project. That is what I am having trouble with

dplr-rn
Partner - Master III
Partner - Master III

use expression Count(distinct total<Project> ResourceNameorID)
Ishilad
Contributor
Contributor
Author

I tried that and a series of variations that involved it and the count i receive is 143 throughout the whole table. I think it is counting all of the employees and not differentiating who is on which project

dplr-rn
Partner - Master III
Partner - Master III

it should work. see below from a dummy sample app.

proj 1 has 2 people, proj2 has 3...

Capture.PNG