Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I don't understand the result of GetFieldSelections when there are mutliple values in chart expression, i try this :
if(GetFieldSelections([SOURCE])=Chr(39)&'VALUE1'&','&'VALUE2'&Chr(39),1,0)
or
if(GetFieldSelections([SOURCE])='VALUE1,VALUE2',1,0)
but it's not working. VALUE1 and VALUE2 are selected in a filter SOURCE, and the if is working when only 1 value is selected.
What's my error ?
Like this (with a space) if(GetFieldSelections([SOURCE])='VALUE1, VALUE2',1,0)
Or you specify the separator if(GetFieldSelections([SOURCE],',')='VALUE1,VALUE2',1,0)
There are other ways to write this using set analysis as, by default, after 6 values selected you will obtain a result like "7 of 22" (if you have 22 different values).
For example, if you want to test if VALUE1 and VALUE2 are the only selected value:
Count(Distinct {<SOURCE/={'VALUE1 ','VALUE2'}>}SOURCE)=0
Ok, but i have not this issue because i have only 4 values. And there are no other filters with the same field.
And in the Qlik's documentation, the result of GetFieldSelections in this case is 'VALUE1,VALUE2'.
So, is it a syntax issue ?
Like this (with a space) if(GetFieldSelections([SOURCE])='VALUE1, VALUE2',1,0)
Or you specify the separator if(GetFieldSelections([SOURCE],',')='VALUE1,VALUE2',1,0)
The space... It's working now, thank you so much !