Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count number of values selected

Hi

I have a selection field that shows the months (Jan - Dec).

I would like to find out, how many months have been selected.

If I use 'Count(Distinct Month)' then I do get the number of selected months, but I also get 12 if there is no month selected. How can I adjust the count to find out if there are none selected?

Thanks

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

=GetSelectedCount(Month)

View solution in original post

8 Replies
senpradip007
Specialist III
Specialist III

use GetSelectedCount() function.

rubenmarin

GetSelectedCount is the function you are searching.

getselectedcount(NombredeCampo [, IncluirExcluidos])

MK_QSL
MVP
MVP

=GetSelectedCount(months)

anbu1984
Master III
Master III

=GetSelectedCount(Month)

ychaitanya
Creator III
Creator III

Month & '( ' & GetSelectedCount( Month) & ')'  will give you count of selected Months

Regards

Chaitanya

PrashantSangle

Hi,

You can use GetSelectedCount(Month)

Logically when no month is selected then you are getting data of all months therefore It means you have all available month to count.

So try GetSelectedCount() instead of count(Distinct Month)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

=GetSelectedCount(months)

Not applicable
Author

Wow, thanks so much for all your replies