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: 
Not applicable

An alternative for Fieldvalue

Hi Community!

I desperately need your help.

I have a table with 2 column Id and Description. I want to return in a text box the Description when the Id = v_Value (contains one of the Ids in the table).

Meaning, I do not want to filter the table with the Id value.

I looking for something like Peek function that can be used in an expression and not the script.

I tried Fieldvalue() but it returns a random description value.

Any suggestions?

Thanks you!!

Hila.

1 Solution

Accepted Solutions
sunny_talwar

What about using Only() with set analysis?

=Only({<Id = {'v_Value'}>}Description)

View solution in original post

7 Replies
sunny_talwar

What about using Only() with set analysis?

=Only({<Id = {'v_Value'}>}Description)

marcus_sommer

If you have only one active ID something like only(Description) will work. Fieldvalue returned the values in load-order - if you couldn't catch them in this way you need a combination of fieldvalue and fieldindex.

- Marcus

Anonymous
Not applicable
Author

Try Only() as well as suggested by Sunny and may be this as well:

=if(Id=$(v_Value), Description)

tresesco
MVP
MVP

And if there are multiple Ids that can have the value, try like:

='The value : '&$(v_Value)& ' Id description(s) - ' & Concat( Distinct {<Id={'$(v_Value)'}>} Description , ',')

Not applicable
Author

Working!!! Thank you so much!

Not applicable
Author

Thank you so much for your help!

I used the only() and it works like a charm!

sunny_talwar

Great