Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
sandeepk218
Contributor II
Contributor II

not able to count the greyed out selected field

Hi,

I want to count the greyed out selected field along with associated green selected field. 
I am using getselectedcount() function. 

Example- in the attached file, I have selected 2 values (tickmarked) but getselectedcount() is resulting in 1 
in should be 2.

kindly help.

Labels (2)
1 Solution
5 Replies
sandeepk218
Contributor II
Contributor II
Author

Hi Henrik,

thank you, that worked.

 

henrikalmen
Specialist II
Specialist II

Great! Please mark my answer as accepted solution so that this question gets marked as closed/asnwered.

jamesandrew034
Contributor
Contributor

If you're facing difficulty counting the greyed-out selected field, it might be due to the field being disabled or inactive. Here are a few steps you can take to troubleshoot the issue: Verify Field Status: Check if the greyed-out field is disabled or inactive. In some cases, certain fields are intentionally disabled or unavailable for selection based on system settings or user permissions. Ensure that the field is meant to be enabled and accessible. Review User Permissions: If you're using a software or platform with user permissions, confirm that you have the necessary access rights to view and interact with the selected field to check the mtg proxy maker. Contact your system administrator or review your user settings to ensure you have the appropriate permissions

johnmonson
Contributor II
Contributor II

Examples and results:  

The following example uses three fields loaded to different filter panes, one for First name name, one for Initials and one for Has proxies.

Examples and results
Examples Results

Given that John is selected in First name.

GetSelectedCount ([First name])

1 as one value is selected in First name.

Given that John is selected in First name.

GetSelectedCount ([Initials])

0 as no values are selected in Initials.

With no selections in .First name, select all values in Initials and after that select the value Yes in Has cellphone.

GetSelectedCount ([Initials], True())

6. Although selections with InitialsMC and PD have Has cellphone set to No, the result is still 6, because the argument include_excluded is set to True().

Data used in example:

Names:
LOAD * inline [
First name|Last name|Initials|Has cellphone
John|Anderson|JA|Yes
Sue|Brown|SB|Yes
Mark|Carr|MC|No
Peter|Devonshire|PD|No
Jane|Elliot|JE|Yes
Peter|Franc|PF|Yes ] (delimiter is '|');