Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

count the number of fields that was selected by user

Hi i would like to come out with a table only if user filter 3 or more fields, i cant hard code it by getselected count as there are 50 over fields.

count(if((wildmatch(GetCurrentSelections(),'*')), 1))


i tried something like above but it only show me as 1 if i choose any of the field. 0 show 0 , 1 show 1 , 2 show 1.


can i make it that it will sum them up?

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Reading your post more carefully: use this in the conditional show:

=SubStringCount(GetCurrentSelections(), ':') >= 3

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
n1ef5ng1
Creator
Creator
Author

count((wildmatch(GetCurrentSelections(),'*')))

output is the same

jonathandienst
Partner - Champion III
Partner - Champion III

I suggest using:

=Alt(SubStringCount(GetCurrentSelections(), ':'), 0)

Use Alt so you get 0 when nothing is selected

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Reading your post more carefully: use this in the conditional show:

=SubStringCount(GetCurrentSelections(), ':') >= 3

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
n1ef5ng1
Creator
Creator
Author

i have a qn, why : and not *

jonathandienst
Partner - Champion III
Partner - Champion III

Because : is the default separator between the field name and the selections. So there is one : per field and we are counting that. There are no * in the GetCurrentSelections(), so there is not point in counting that.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein