Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

omarbensalem
Esteemed Contributor

How to retrieve the possible values of a dimension in a text box?

Hi Folks,

The thread's title is maybe not that clear; but let me explain what I'm seeking to do:

For example: I have 2 dimensions: num and nom

Capture.PNG

What I want to do: is when I select num=1; I want to display in a text object nom:x,y ; how to do so?

I've tried with : aggr(only({<nom=p(nom)>}nom),nom)

But, that did not work; any idea?

1 Solution

Accepted Solutions
ali_hijazi
Honored Contributor

Re: How to retrieve the possible values of a dimension in a text box?

you can use concat function as follows:

='nom:' & concat(distinct nom,',')

5 Replies
ali_hijazi
Honored Contributor

Re: How to retrieve the possible values of a dimension in a text box?

you can use concat function as follows:

='nom:' & concat(distinct nom,',')

omarbensalem
Esteemed Contributor

Re: How to retrieve the possible values of a dimension in a text box?

Sorry to bother you; just found it

='The associated nom : '& concat(distinct aggr(only({<nom=p(nom)>}nom),nom),',')


Result:

Capture.PNG

Capture.PNG

Capture.PNG

omarbensalem
Esteemed Contributor

Re: How to retrieve the possible values of a dimension in a text box?

Much easier ! Don't know why this did not work with another application though; yet It works with this case..

Thank u anyway !

omarbensalem
Esteemed Contributor

Re: How to retrieve the possible values of a dimension in a text box?

We could also change it as follow to retrieve the associations by nom and num; I mean :

= concat(distinct num&':'&nom,', ')

Capture.PNG

omarbensalem
Esteemed Contributor

Re: How to retrieve the possible values of a dimension in a text box?

What if I wanted to show : 1:x,y 2:a 3:b ?