Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
breno_morais
Partner - Contributor III
Partner - 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
Champion III
Champion III

Try this?

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


OR just

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


View solution in original post

2 Replies
vishsaggi
Champion III
Champion III

Try this?

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


OR just

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


stigchel
Partner - Master
Partner - Master

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)