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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JonathanKelly
Contributor III
Contributor III

Divide by a variable/Null values

Hi,

I have a bar chart where I am trying to divide the bar to show an average of jobs done, however the number of people working each day varies. In the bar chart below on 26/03 only 1 person worked so this should be 25, I currently have it as dividing by 6 as that is the average of people but, how can I count how many people worked and void out Null values against for people who didn't? 

JonathanKelly_0-1649344646160.png

 

Labels (4)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

To get the average number of jobs per person, the following should work:

Count(distinct JobID) / Count(distinct PersonID)

NULLs should be automatically handled.

View solution in original post

1 Reply
hic
Former Employee
Former Employee

To get the average number of jobs per person, the following should work:

Count(distinct JobID) / Count(distinct PersonID)

NULLs should be automatically handled.