Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

getselected count function

can anyone explain getselectedcount function?????? why we use and how?????

1 Solution

Accepted Solutions
chhavi376
Creator II
Creator II

Getselectedcount is used to find out that how many values are selected for a particular field.

You can use it to make a particular object conditional when atleast one value is selected in the field

getselectedcount(Fieldname)<>0 can be used in that case

I have attached a sample, if you select an ID, the sum correponding to that ID will be displayed.

But if no ID is selected, the sum disappears

The text box here is conditional.

You can go to the conditions of the text box and see exactly what is happening,

View solution in original post

9 Replies
Anonymous
Not applicable
Author

From Qv help file:

Chart Field Functions:

getselectedcount (FieldName [, IncludeExcluded])

Returns the current number of selected values in a field.

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

getselectedcount ( Year )

getselectedcount ( Year, true( ) )

I.e if you select 2016 & 2015 from field year

getSelectedCount(year) = 2

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

The function takes the field name as parameter and it will count the numbers of values which are selected in that field.

So example you have country field with 15 values.

If you select 3 values.

The function =GetselectedCount('Country') will return 3 as value.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
chhavi376
Creator II
Creator II

Getselectedcount is used to find out that how many values are selected for a particular field.

You can use it to make a particular object conditional when atleast one value is selected in the field

getselectedcount(Fieldname)<>0 can be used in that case

I have attached a sample, if you select an ID, the sum correponding to that ID will be displayed.

But if no ID is selected, the sum disappears

The text box here is conditional.

You can go to the conditions of the text box and see exactly what is happening,

Anonymous
Not applicable
Author

Thanks to all.

girirajsinh
Creator III
Creator III

Here in attached document I have tried to clear the understanding over the QlikView Field functions

Please find the attachment and let me know how did you like it.

Anonymous
Not applicable
Author

hai,chhavi

in here where u gave getselected count.i can't undrstnd.

chhavi376
Creator II
Creator II

Hi Sindhu ja,

GetSelectedCount is used in the 'Layout' of the text box, to restrict the visibility of that text box.

It appears only when atleast one value from the multi box is selected(GetSelectedCount(ID)>1 in this case), and disappears when no value (GetSelectedCount(ID)=0 in this case) is selected in the multibox.

Capture.PNG

Not applicable
Author

Hi Sindhu,

please close the ticket if you got the answer.