Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ZuzJsk007
Contributor III
Contributor III

lookup value of ID based on current selection

Hi, I'm fairy new to Qlik Sense and I'm struggling with the following:

I have a Filter pane with ProductName. I would like to display ProductID in a table measure based on that selection, something like:

only(FieldValue(ProductID, FieldIndex('ProductName', GetFieldSelection(ProductName))))

(in data model, the two fields are a part of the same table)

So I would get a table like below when I select ProductName "Abc, Def" which actually have ID 1 and 2:

ProductID
1,2

 

Thank you very much 🙂

Labels (3)
1 Solution

Accepted Solutions
MayilVahanan

HI @ZuzJsk007 

Try like below

Concat(Distinct ProductID, ',')

or

if(GetselectedCount(ProductName) > 0, Concat(Distinct ProductID, ','))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

HI @ZuzJsk007 

Try like below

Concat(Distinct ProductID, ',')

or

if(GetselectedCount(ProductName) > 0, Concat(Distinct ProductID, ','))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ZuzJsk007
Contributor III
Contributor III
Author

The if() version works like a charm, thanks a lot!:)