Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
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
Master III
Master III

=GetSelectedCount(Month)

View solution in original post

8 Replies
Specialist III
Specialist III

use GetSelectedCount() function.

GetSelectedCount is the function you are searching.

getselectedcount(NombredeCampo [, IncluirExcluidos])

MVP
MVP

=GetSelectedCount(months)

Master III
Master III

=GetSelectedCount(Month)

View solution in original post

Creator III
Creator III

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

Regards

Chaitanya

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.
Not applicable

=GetSelectedCount(months)

Not applicable

Wow, thanks so much for all your replies