Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

GetSelectedCount

Hi,

I hear that the function GetSelectedCount (in the latest QV version) is able to take the alternate state as an argument.

If so then what syntax is needed?

The standard syntax 'GetSelectedCount({AS} FieldName)' doesn't work.

Thank you in advance,

larisa

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe

=GetSelectedCount(FieldName, 0, 'AS')

View solution in original post

5 Replies
robert_mika
Master III
Master III

This function will only works in front end

like this(from help)

getselectedcount (FieldName [, IncludeExcluded [, State]])

Returns the current number of selected values in a field. It is possible to query an alternate state.

If IncludeExcluded is true the count will include selected values, which are currently excluded by selections in other fields. If false or omitted these values will not be included.

State is the alternate state to query.

Feeling Qlikngry?

How To /Missing Manual(18 articles)

antoniotiman
Master III
Master III

Hi Larisa,

Robert is right, but since QV 11.20 SR8.

You remember, Concat() and Count() functions support Alternate State.

Regards,

Antonio

Anonymous
Not applicable
Author

Hi,

I've experimented with this formula. Now I see how the first part of it works.

1) getselectedcount (Brands, Var_IncludeExcluded=1)

2) getselectedcount (Brands, Var_IncludeExcluded=0)

These two variants resulted in the different figures according to the value of the variable Var_IncludeExcluded.


But I still don't see how I should add alternate state to this formula.


If I type brackets [] as you explained above, then QV considers the syntax to be wrong.


Could you please clarify?


The alternate state name is AS.


How should I add it to the formula: 'getselectedcount (Brands, Var_IncludeExcluded=0)'?

maxgro
MVP
MVP

maybe

=GetSelectedCount(FieldName, 0, 'AS')

Anonymous
Not applicable
Author

Thank you! It works.