Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
philgood34
Contributor II

DYNAMIC TITLE WITH SEVERAL VALUES

Hi

i have a graph with dynamic title (graph) linked to the field NCL_LIB (including values : sector 1, sector2 ...) as shown

1SECTOR.png

My issue, is then i select several values, the title disappear ...

2SECTOR.png

I used this variable

VARIABLE.png

in this expression

EXPRESSION.png

A idea ?

REGARDS

Philippe

1 Solution

Accepted Solutions
lironbaram
Honored Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

if there is more than one value

than your expression will result in null

if you want to display all selected values

you can use this expression in your variables:  =concat(NCL_LIB,',')

8 Replies
lironbaram
Honored Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

if there is more than one value

than your expression will result in null

if you want to display all selected values

you can use this expression in your variables:  =concat(NCL_LIB,',')

philgood34
Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

it's working as expected !

thank's you very much

best regards !

philgood34
Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

Another question Liron please ,

if i want to inclue a condition in the expression, what is the syntax ?

for example : "if there is no sectors selected, the title have to be "NS"

i try this

=if('$(NCL_LIB)'='','NS','$(vSECTEURS)')

Working when there is no selection (NS is dysplayed)

but if i select now sector1, NS s is still dysplayed

syntax error i suppose ...

regards

Philippe

lironbaram
Honored Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

Hi

i will do something like this

=if(getselectedcount(NCL_LIB)=0,'NS', concat(NCL_LIB,','))

philgood34
Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

perfect !

best regards

Philippe

philgood34
Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

Hi Liron

I have a additional question for you !

i completed my issue with multiple conditions; let me explain :

i applied your expression to 2 fields  FILIERES/SECTORS, and not only SECTORS

llike this :

=if(getselectedcount(NCL_LIB)=0,if(getselectedcount(FILIERES)=0, 'EMPTY',concat(FILIERES,',')), concat(NCL_LIB,','))


it's working pretty good in 2 cases out of 3 :


empty.png     1SECTOR.png

here is the issue : repetitive filieres's value in the title, when i selected one "FILIERES" (PF, PF, PF instead of only PF) 

filieres.png

have you a idea to fix it  ?


regards


Philippe

lironbaram
Honored Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

hi

apparently this field has the same value in several different rows

so this is the reason for the duplicate

it's an easy fix

=if(getselectedcount(NCL_LIB)=0,if(getselectedcount(FILIERES)=0, 'EMPTY',concat(distinct FILIERES,',')), concat(distinct NCL_LIB,','))

philgood34
Contributor II

Re: DYNAMIC TITLE WITH SEVERAL VALUES

so easy !

thank's again :-))

regards

Philippe