Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
DEMONIO_AZUL
Contributor III
Contributor III

Choosing a value when selecting another value in the same table row

Hello there!

I am using Qlik Cloud Analytics and I have this table:

DEMONIO_AZUL_0-1741384560153.png

I need to get the value of the DoB (Date of Birth) if I choose any (but only one) of the people listed in Name to be used in a KPI, for example.

So, if I select this Helen (highlighted in yellow, because there is another Helen below), I want to obtain 1963-01-06.

If there were more than one names selected, the output should be blank or an error message (e.g. 'More than one name selected').

Problem is that there are more than one Helen in the table, so, when choosing Helen there are still multiple values of DoB and I don't know how to filter them to obtain only the date of birth of the Helen I chose. I can use only Name as filter.

I am using GetFieldSelections(Name) in the KPI to know which name has been selected, but no mater what I have tried, my knowledge has not been enough to decipher how to get the correct DoB.

Any hints will be appreciated.

Thanks!

 

 

Labels (3)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

This is a tricky problem - when several people share the same name, selecting the name will result in selecting all of these people, and Qlik wouldn't recognize the specific line in the table chart that you clicked on.

I'd try replacing the original field Name with a Dual value. The textual part of the dual value should contain the Name, and the numeric part of the dual value could contain a number that identifies each person uniquely. If you have a unique ID in your data, you could use it. If you have no unique ID, you could generate one, using Autonumber(). So, something like this should work for you:

LOAD

... ,

Dual( Name, Autonumber ( Name & Address & DoB) ) as DualName,

...

Now, if you select DualName, I believe Qlik will select a single row, based on the unique ID. I never tested that by myself, but try that and see if it works for you.

Cheers,

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

This is a tricky problem - when several people share the same name, selecting the name will result in selecting all of these people, and Qlik wouldn't recognize the specific line in the table chart that you clicked on.

I'd try replacing the original field Name with a Dual value. The textual part of the dual value should contain the Name, and the numeric part of the dual value could contain a number that identifies each person uniquely. If you have a unique ID in your data, you could use it. If you have no unique ID, you could generate one, using Autonumber(). So, something like this should work for you:

LOAD

... ,

Dual( Name, Autonumber ( Name & Address & DoB) ) as DualName,

...

Now, if you select DualName, I believe Qlik will select a single row, based on the unique ID. I never tested that by myself, but try that and see if it works for you.

Cheers,

DEMONIO_AZUL
Contributor III
Contributor III
Author

Thank you, Oleg!
That worked!

Cheers,
~Demian

nevopotokcloudinary
Contributor III
Contributor III

Hi,

Maybe you can check that the user select a value and the count of values in 1 and not something else 

 

e.g.

if( GetFieldSelections(Name)>0 and count(Name)=1,Max(DoB),'')

in this case when the user select "Helen" you won't get any value or you can replace with error message