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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ni_avoss
Creator
Creator

getfieldselections & getselectedcount return different fieldcount -> IncludeExcluded

hi there,

in the frontend I want to combine the functions getfieldselections & getselectedcount  to dynamically show fieldselections, based on the number of selections.

the problem: both return different fieldcount.

I found out that getselectedcount has the parameter IncludeExcluded, which defaults to false. If set to true() both functions return the same fieldcount so I guess getfieldselections includes excluded values which is quite confusing.

Is there any way to not include exluded values in getfieldselections() ? Or any different ideas for a workaround?

thanks,

alex

13 Replies
sunny_talwar

I agree with Marcus, I don't really understand what you have and what kind of issue you are running into?

ni_avoss
Creator
Creator
Author

Hi Marcus,

while trying to build an example I found out that the approach with concat works fine,

I cannot recall what was wrong there yesterday.

Thank you all for your help, esp. Sunny.

Best,

Alex

shannoypaul
Creator
Creator

@sunny_talwar 

I tried passing a placeholder in a similar expression, however the Concat() function is not identifying the placeholder:

Expression Used - ='$(vSelectionQuery(Dim1))'

Variable Definintion vSelectionQuery

=If(GetSelectedCount($1)=0,Null(),'&select=' &'$1,' & Concat(Distinct$1,','))

The Place holder $1 in green font works fine, the one in red font in Concat() function doesn't gets assigned with the placeholder.

TIA,

Shannoy

 

 

tellmalaika17
Contributor II
Contributor II

Hi,

 

I have a similar request in Pivot Table. For eg:

Fieldname - Category 1, another field name is country (listed as a,b,c in thsi case)

 Month 1Month 2
Category 1 Total2035
a1020
b510
d55

On selection of Country b, i want to exclude the  total of b from Category 1 Total. so which means row for country b will be there just the selected country value ie 5 for Month 1 should be removed from Category1 Total.