Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
breno_morais
New Contributor III

Set Analysis with Variables

Dear All,

I'm using a variable for take filter and use in my set analysis, but don't works. Any help?

vCor = GetFieldSelections(COR_RACA)

KPI = Count ( {$<COR_RACA= {"=$(vCor)"}>} UNIC_ID)

Why this doesn't works? If I do not use the variabel it's better

1 Solution

Accepted Solutions
vishsaggi
Esteemed Contributor III

Re: Set Analysis with Variables

Try this?

KPI = Count ( {$<COR_RACA= {"$(=$(vCor))"}>} UNIC_ID)


OR just

KPI = Count ( {$<COR_RACA= {$(vCor)}>} UNIC_ID)


2 Replies
vishsaggi
Esteemed Contributor III

Re: Set Analysis with Variables

Try this?

KPI = Count ( {$<COR_RACA= {"$(=$(vCor))"}>} UNIC_ID)


OR just

KPI = Count ( {$<COR_RACA= {$(vCor)}>} UNIC_ID)


stigchel
Honored Contributor

Re: Set Analysis with Variables

If you want to handle multiple field selections as well, you need to include the delimiters. Try like

For vCor (include the = sign)

=Concat(DISTINCT COR_RACA,Chr(39)&','&Chr(39))

KPI

=Count({<COR_RACA={'$(vCor)'}>} UNIC_ID)