Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add a dynamic elem_no to FieldValue()

Hi guys

Yet again, I seek your collective wisdom. 😃

I want to use the function FieldValue() and have used it thus: =FieldValue([FIELDNAME], 1), which returns the field value for the first row in the load order (elem_no=1). However, what I would like is to provide the elem_no dynamically, i.e., when I select another field, get the rownumber (or elem_no) of that value and get the fieldvalue of another field. In pseudo code: =FieldValue([FIELDNAME1], elem_no(FIELDNAME2)). Is this possible?

Thanks again for your time!

//Nathalie

3 Replies
sunny_talwar

Where exactly are you using this FieldValue() function?

Carlos_Reyes
Partner - Specialist
Partner - Specialist

I think you can use FieldIndex for that... something like:

FieldValue('City',FieldIndex('Country',Only(Country)))

Review the enclosed file for the example.

sdmech81
Specialist
Specialist

Something like this:

=FieldValue('[FIELDNAME1]',FieldIndex('[FIELDNAME2]',[FIELDNAME2)])

index takes 2 values and returns number based on load order..

Share sample/appliction