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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stascher
Partner - Creator III
Partner - Creator III

Equivalent function to Lookup but for charts

Hello,

Given a table similar to the following:

location favorite_fruit
Home Apple
Office Apple

 

I would expect to be able to use  the following expressions: 

=fieldvalue('favorite_fruit',fieldindex('location','Home')) or 

=fieldvalue('favorite_fruit',fieldindex('location','Office'))

This works fine if the favorite_fruit values are unique, but if they're the same, fieldvalue() regards favorite_fruit as having only 1 value and thus =fieldvalue('favorite_fruit',fieldindex('location','Office')) returns null. 

Is there any expression that would return the favorite_fruit value for Office regardless of non-unique values? 

Thanks,

Steve

Labels (1)
1 Reply
vinieme12
Champion III
Champion III

why not use a MaxString() ??

 

MaxString({<location={'Office'}>}favorite_fruit)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.