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: 
adiarnon
Creator III
Creator III

expression :(

hi,

i have 2 table

1. emp_in_courses

2.employees

the key between them is emp_key

* i have a field year - the year of the course

* there are employees that never been in a course

i need to find -

if im filtered on 2016

the employees that not participated in a course in 2016

that means-

(the employees that not participated in a course in 2016  but participated in other years and employees never participated in a course)

how can i write the expression??

i have a filter on year 2016...

adi

6 Replies
migueldelval
Specialist
Specialist

Hi Adi,

Could you attach a sample of your data, please.

Regards

Miguel del Valle

PrashantSangle

Hi,

You want count or what??

try like

count({<Year-={"$(=max(Year))"}>}employee)

It will give selected count employee which are not participated in selected max year.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
adiarnon
Creator III
Creator III
Author

my problem is that if im filtered on year=2016 how can i find the employee with no courses

this expression will give me the employees who participated in a course before max(year)  but what about the employees that never participated in a course?

Anonymous
Not applicable

Hi,

for employees that never participated in a course

u can try this


count({<emp_in_courses-={"*"}>}employee)


can u attach sample qvw.. it will help to understand the problem

Anonymous
Not applicable

Hi Adi,

Can you share some sample data?

johnw
Champion III
Champion III

Maybe something like this?

count({<year-={'$(=max(year))'},emp_key={"=
count({<year-={'$(=max(year))'}>} course)"
>} distinct emp_key)