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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
amuthiyan
Contributor
Contributor

Listbox conditional compare to different field

Hi, I'm new to QlikView and this is my first time posting here, so sorry if this is a stupid question.

I want to set up a listbox that displays values from a field called EmpID. There is another field called EmployeeID, which contains a subset of EmpID. EmpID is connected to other fields while EmployeeID is not. I want to display in the Listbox only the distinct values of EmpID that are in EmployeeID. How would I go about doing this?

Thanks for your help.

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

This is an unusual case. Especially as you are new, my first instinct is that your data model is incorrect and there is a better way to approach your requirement.  If you can describe why these fields are not connected, I'll be happy to make some suggestions. 

For the record, the answer to the literal question you asked is to define the listbox with an expression like:

=aggr(only({<EmpId=P(EmployeeId)>}EmpId), EmpId)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

Brett_Bleess
Former Employee
Former Employee

Aneesh, did Rob's post get you what you needed?  If so, please be sure you use the Accept as Solution button on his post to give him credit for the help and to let others know the solution worked.  If you are still working on things, as Rob noted, it would help if you could expand upon the actual use case or attach sample app, so we can have a look at things in greater detail.

Here is a very useful area of Community for new folks as well, the Design Blog area, there are hundreds of posts out here from our experts on how to do different things, so be sure to keep this handy and look around there as you have time to get an idea of what is there...

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.