Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
lailarhc
Creator
Creator

List on a chart table values that appear only once

Hello.
I have a chart table with a column where I list employees and another where I list courses they have taken.
Employees who have not taken any course are only listed once with an empty string for the course column value.

I want show on another chart table only the employees whose count are equal to one.
But I get an error when I try my solution.

Here's my table:

1.png

 

As you can see, there's only one employee who only appears once. That's the one employee who has not taken any courses. I want him to be the only one listed.

I've tried putting this on the Employee field: =if((Count(Employee) = 1), Employee)
But it says it's an Invalid Dimension.

What am I doing wrong? Is my logic flawed? Please help me.

Thank you in advance.

Labels (1)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

Try the following as your dimension definition for your second table:

Aggr(Only({$<Employee={"=Count([Course])=1"}>} Employee), Employee)

The set analysis {$<Employee={"=Count([Course])=1"} could also be used in a measure definition to limit what Employees are included.

Note: I did change the count object to [Course].

Hope that helps.

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

Try the following as your dimension definition for your second table:

Aggr(Only({$<Employee={"=Count([Course])=1"}>} Employee), Employee)

The set analysis {$<Employee={"=Count([Course])=1"} could also be used in a measure definition to limit what Employees are included.

Note: I did change the count object to [Course].

Hope that helps.

lailarhc
Creator
Creator
Author

It worked! Thank you 🙂