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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Distinct Count

Hello I have a field (projectNME that has 4 possible values.

I have a list of 2,681 records of which these 4 values (print, digital, motion & video) comprise all of the records.

I want to get a count of how many times print, digital, etc appear. What is the expression?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this

Dimension

JobType


Expression

Count(jobsJobTypeID)

Output from this data should look like this

JobTypeCount(jobsJobTypeID)
Print3
Digital3
Motion2
Video3

View solution in original post

7 Replies
sunny_talwar
MVP
MVP

May be add projectNME as a dimension and Count(projectNME) as expression

evansabres
Specialist
Specialist
Author

These seems to only count the 4 unique projectNME's. I am looking for the distinct number of times that 'print' and 'motion' appear

sunny_talwar
MVP
MVP

Are you sure you are doing this?

Dimension

projectNME


Expression

Count(projectNME)

Do not add DISTINCT to your expression. This will give you a chart where you will have print, digitial as your dimension and number of times they appear

sunny_talwar
MVP
MVP

I am not sure what you mean distinct number of times? Can you elaborate by sharing a sample with expected output?

evansabres
Specialist
Specialist
Author

My data appears as this. Trying with the actual field names this time

jobsJobTypeID

1

1

2

4

2

3

4

1

2

3

4

In my script, I have an in-line table, which appears as:

jobsJobTypeID, JobType

1, Print

2, Digital

3, Motion

4, Video

I want to calculate from the data, the number of times total that '1' (Print) appears and so on.

sunny_talwar
MVP
MVP

May be this

Dimension

JobType


Expression

Count(jobsJobTypeID)

Output from this data should look like this

JobTypeCount(jobsJobTypeID)
Print3
Digital3
Motion2
Video3
evansabres
Specialist
Specialist
Author

Perfect, thank you!