Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

IN operator in qlikview

Hi All,

I am facing an issue to store multiple values returned by the variable.

In chart Expression i have to store the values returned by variable but unable to do it is count expression like :

=count({<[SELF SCORE_Desc]   {(Vstatic_emp)}>} compe_self_score)

In above expression variable(Vstatic_emp has 5 values which he returned these has to compare with SELF SCORE_Desc) equal to is not useful.

Kindly Suggest.

Thanks

Manish

11 Replies
its_anandrjs
Champion III
Champion III

Try with

=count({<[SELF SCORE_Desc]   { '$(Vstatic_emp)' }>} compe_self_score)


Here i assume Vstatic_emp is a variable.

tresesco
MVP
MVP

What is the definition of your variable? does it return values separated by comma?

Anonymous
Not applicable
Author

nope it's not working...Vstatic_emp is a name of variable if i keep it n Quotes i think it will act as a string.

its_anandrjs
Champion III
Champion III

What type of values In Vstatic_emp variable.

Anonymous
Not applicable
Author

Vstatic_emp is -->GetCurrentSelections([SELF SCORE_Desc])

where SELF SCORE_Desc contains

Load * Inline

[

compe_self_score, SELF SCORE_Desc

0,W

1,DN

2, RS

3, P

4, E

];

tresesco
MVP
MVP

Redefine your variable like:

=chr(39)& GetFieldSelections([SELF SCORE_Desc] ,chr(39)&','&chr(39)  ) &chr(39)

     

=count({<[SELF SCORE_Desc]   { $(Vstatic_emp) }>} compe_self_score)

Update: Corrected

Anonymous
Not applicable
Author

Not working.

Please find attached qvw file for reference.

ashfaq_haseeb
Champion III
Champion III

Hi your variable Vstatic_emp is null.

That's why it returned zero.

Select some values in SCORE_Desc you will get it working.

Regards

ASHFAQ

tresesco
MVP
MVP

You have to realize that, this expression would return a value only when you select some values from your [SELF SCORE Desc] field. And if you don't want it to be so, your simple Count(..) without set analysis should be good enough.