Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get Corresponding field-values

I am in the following situation:

I have a set of data, where there is a selection from a user.

Example:

Base Data: Letter A-Z, Numbers 13-1

Selection:

LetterNumber
B13
C12
D12

What I want now is to use the first row of data to display it in charts.

I have been working with the Fieldvalue-Method which works fine

(FieldValue('Number', FieldIndex('Number' , MIN(Number)))),


but I don't know how to get a corresponding field-value like 12 for c.

Is there a function and if so what is its name?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

MIN({<Number={'$(=min(Number))'}>} Number)

ONLY({<Number={'$(=min(Number))'}>} Letter)


seems to work in case of set analysis

View solution in original post

8 Replies
Anonymous
Not applicable
Author

I will try out set analysis, but I wonder whether there is another way

Anonymous
Not applicable
Author

MIN({<Number={'$(=min(Number))'}>} Number)

ONLY({<Number={'$(=min(Number))'}>} Letter)


seems to work in case of set analysis

sunny_talwar

Is this after selection? and Letter C and D have both Number 12 assigned to them?

Anonymous
Not applicable
Author

Both letters have 12, E and F have 11 assigned to them.

The table shows the selection, the values don't change.

sunny_talwar

I guess I am trying to understand few things

1) Where are you trying to display this information? This -> ONLY({<Number={'$(=min(Number))'}>} Letter) won't work in text box object if 12 or 11 is selected because there are two Letter available for 12 or 11. Alternative is to use Concat() instead of Only.

2) Are you making selections to view this or this is always needed?

Anonymous
Not applicable
Author

I left out concate since this seems to create a new value which does not exist as such in the table, it is important to know it exists though.


The idea is to have any selection of values greater than 1 row and to display the top table-row.

I use an if-statement to check whether only 1 row is selected, otherwise I display the top one (actually it is the min-value-row, which is on top by default-order in my real app).

sunny_talwar

So seems like you have it working then? Or are you still looking for help with anything?

Anonymous
Not applicable
Author

It works now,

I didn't know about the concate and only aggregations when I asked - so I weren't sure whether set analysis can do it.

Since I program in f.e. java, I hoped there might be a function providing the corresponding field-values of a defined field as an array or something like this, but this works, too.