Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
EGilbert
Contributor III
Contributor III

Display result based on formula on a different field

I have a table with a number of fields  For the example lets call on Value and it is numeric.  Another field is a string and call it name and lastly another string called country.  I would like to display in a text box The name associated with the lowest value in the value field.  There will be a list box where the user can select a country which will change the results.  How do I write that expression?

Labels (2)
1 Solution

Accepted Solutions
EGilbert
Contributor III
Contributor III
Author

Thanks for the suggestion.  This would work to return the min value for the selected country but that is not quite what I need.  I need to return the value in the name field associated with the min value.  I did get it to work using the below expression

=concat( {<[Value]={"$(=min([Value])"}>} DISTINCT [Name])

 

This appears to be working but I am not sure if there is a better way to accomplish my desired results

View solution in original post

2 Replies
Lisa_P
Employee
Employee

This is normal behaviour in QlikView.  Create a text object, in the Text on the general tab use your min expression

eg =Min(Value)

as you select Country, this will change to show the min Value for that country

EGilbert
Contributor III
Contributor III
Author

Thanks for the suggestion.  This would work to return the min value for the selected country but that is not quite what I need.  I need to return the value in the name field associated with the min value.  I did get it to work using the below expression

=concat( {<[Value]={"$(=min([Value])"}>} DISTINCT [Name])

 

This appears to be working but I am not sure if there is a better way to accomplish my desired results