Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
dennis_o
New Contributor III

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
dennis_o
New Contributor III

Re: Get Corresponding field-values

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

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


seems to work in case of set analysis

8 Replies
dennis_o
New Contributor III

Re: Get Corresponding field-values

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

dennis_o
New Contributor III

Re: Get Corresponding field-values

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

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


seems to work in case of set analysis

Re: Get Corresponding field-values

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

dennis_o
New Contributor III

Re: Get Corresponding field-values

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

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

Re: Get Corresponding field-values

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?

dennis_o
New Contributor III

Re: Get Corresponding field-values

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).

Re: Get Corresponding field-values

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

dennis_o
New Contributor III

Re: Get Corresponding field-values

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.