Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
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)

View solution in original post

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

=GetSelectedCount(months)

Not applicable
Author

Wow, thanks so much for all your replies