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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alternate state question


I have an alternate state 'State1', assigned to a list box entity. and my expression =GetSelectedCount((State1) * Entity) returns a '-'.

I have selected a single value there and was expecting '1'. why doesn't it work?

Thanks,

Ram

7 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Because State1 assigned to an object, allow the object to work separately respect to the others, State1 is not a variable or a field

Not applicable
Author

Thanks Alessandro. I agree to all that, but I need the count of selections of the list box that has the alternate state 'State1'.

its_anandrjs
Champion III
Champion III

Try like

=GetSelectedCount(State1) * Entity

alexandros17
Partner - Champion III
Partner - Champion III

The object in which you need to do getselectedcount(myField) must have the same state1 of the list box ...

tresesco
MVP
MVP

GetSelectedCount() - does NOT work with alternate state. Rather try like:

Count({State1} Distinct YourField)

Not applicable
Author

Thanks tresesco. I will try that.

Sent from my iPhone

Not applicable
Author

it works, but if nothing is selected it gives the total count, I expect it to be zero.