Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Can anyone give me an example of getselectedCount() function

What is the use of getselectedcount() function? can anyone give me an example?

Tags (1)
7 Replies
Highlighted

Re: Can anyone give me an example of getselectedCount() function

From Help:

getnotselectedcount ( FieldName [, IncludeExcluded])

Returns the current number of not-selected values in a field in a field with AND-Mode in List Boxes (red values in list box).

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.

Examples

getnotselectedcount ( Year ) 

getnotselectedcount (Year,true())

Highlighted

Re: Can anyone give me an example of getselectedCount() function

In order to hide an object when more than one dimension value is selected, add this to the Conditional Show expression box:

getselectedcount(CustomerName) = 1

Can be used for displaying a phone number to call in a large font in a text box, whenever you select a single customer in a list box or in a table.

BTW use getpossiblecount() if you want to show information whenever a single field value is indirectly selected (through association)

Highlighted
Master III
Master III

Re: Can anyone give me an example of getselectedCount() function

Check this

Highlighted
Creator III
Creator III

Re: Can anyone give me an example of getselectedCount() function

As I am using QlikView personal edition.Please give me the code for it.

Highlighted
Creator III
Creator III

Re: Can anyone give me an example of getselectedCount() function

You mean you have to use getselectedcount at front end rather than use in script?

can give me an screen shot of how to use it?

Highlighted
Master III
Master III

Re: Can anyone give me an example of getselectedCount() function

Load * Inline [

billing,payment

tenders,100

dues section,200

aaa,50

bbb,60 ];

Text box expr

='Selected count: '&GetSelectedCount(billing)

Getselcnt.png

Highlighted
Specialist III
Specialist III

Re: Can anyone give me an example of getselectedCount() function

one scenario could be like below.

Assume that you have a field Region and you want to display the data in a table box when end user selects at least one Region. then you can use the getselectedcount(Region) condition to display the data in the table box like below.

T157696_1.png

Go to the Table box properties and add condition as getSelectedCount(Region)>0 that means whenever at least one value in the field Region is selected then the chart/table will display data.

T157696_2.png

now if you select one or more value in the Region field then the data becomes visible in the table.

T157696_3.png