Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
michaelfentondata
Partner - Contributor III
Partner - Contributor III

How to find people that do not hold a qualification

We have a data set where staff are trained and hold a qualification for a finite period of time.  I have created a data model with a fact table that holds one record per person (Staff) per qualification (Training Type) per day that the qualification is valid for.  Please see the attached table view.

Table View.jpg

I can now produce charts that show many staff hold each type of qualification within given date ranges.

The client also wishes to see which staff did NOT hold a particular qualification (or group of qualifications) within a given date range.  I would prefer not to add more records to the fact table as I already have 10's of millions of rows and running out of memory.

Is there a set analysis expression I can use?  It is not as easy as selecting records that do not equal a Training Type as staff members hold multiple qualifications at a given point in time.

Message was edited by: Michael Fenton Uploaded sample app

1 Solution

Accepted Solutions
michaelfentondata
Partner - Contributor III
Partner - Contributor III
Author

I have discovered a simpler solution to this problem.  Actually from a post of swuehl a couple of years ago.

This expression gives me what I need:  Sum({$<StaffId=E(), QualificationGroup= >} StaffCount)

I found the answer here: http://community.qlik.com/thread/64009

I do not find it intuitive at all, and the syntax checker marks it as incorrect, but it works perfectly and easily.

Now I need to go back and get rid of those unnecessary objects and fields in my data model...

View solution in original post

6 Replies
Not applicable

Can you attach sample of your application?

michaelfentondata
Partner - Contributor III
Partner - Contributor III
Author

I have attached it now.

swuehl
MVP
MVP

Have you tried selecting the date range and training type. Then the excluded values in staff should show what you want?

If so, you can try the e() function (implicit field value definition) maybe something like:

=concat({<StaffName = e() >} distinct StaffName)

when date range and training type is selected.

michaelfentondata
Partner - Contributor III
Partner - Contributor III
Author

That is getting closer.  However, I don't want all selections excluded.  For example I only want to see Staff that do have a Shift on the dates selected, but not have the Training Type selected.

michaelfentondata
Partner - Contributor III
Partner - Contributor III
Author

I have solved this with a combination of Alternate State and the excluded element function in set analysis.

  1. Firstly, I created a new alternate state called Unqualified.
  2. Add Training Type filter with assigned to the new alternate state
  3. Created the following set analysis expression:

     Sum({$ <StaffId = E({1<TrainingType=Unqualified::TrainingType>})>}StaffCount)

This seems to be giving me the results I expect.

Thanks to swuehl for pointing me in the right direction.

michaelfentondata
Partner - Contributor III
Partner - Contributor III
Author

I have discovered a simpler solution to this problem.  Actually from a post of swuehl a couple of years ago.

This expression gives me what I need:  Sum({$<StaffId=E(), QualificationGroup= >} StaffCount)

I found the answer here: http://community.qlik.com/thread/64009

I do not find it intuitive at all, and the syntax checker marks it as incorrect, but it works perfectly and easily.

Now I need to go back and get rid of those unnecessary objects and fields in my data model...