Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Getselectedcount for filtered list box

Hi,

I have a list box in qlik sense using $Table field and i have applied a filter condition in this list box.

Ex: IF($Table<>'Table1',$Table)

when i select a value in the above list box, the getselectedcount($Table) fucntion is not working correctly and it is always showing "0".

How to fix it?

Tags (1)
1 Solution

Accepted Solutions
Highlighted

Re: Getselectedcount for filtered list box

Try this as a filter box expressionCapture.PNG

=Aggr(Only({1<$Table -= {'DATA'}>} $Table), $Table)



View solution in original post

10 Replies
Highlighted
MVP
MVP

Re: Getselectedcount for filtered list box

Seems to work fine for me:

2018-06-05 12_11_41-QlikView x64 - Evaluation Copy - [Data Visualization_].png

I used as basis for the Field the Expression:   If( $Table <> 'Sales' , $Table )

Highlighted
Partner
Partner

Re: Getselectedcount for filtered list box

For me it is not working Petter.

i am also using the same conditions.

if( $Table <>'CAPITAL_FLOW', $Table)

GetSelectedCount($Table)

Highlighted
Partner
Partner

Re: Getselectedcount for filtered list box

Please find my attachment (2nd sheet) and suggest me !

Highlighted

Re: Getselectedcount for filtered list box

Try this as a filter box expressionCapture.PNG

=Aggr(Only({1<$Table -= {'DATA'}>} $Table), $Table)



View solution in original post

Highlighted
Partner
Partner

Re: Getselectedcount for filtered list box

Thank you very much sunny.

It is working fine now.

Highlighted

Re: Getselectedcount for filtered list box

Awesome, I am glad we were able to help

Highlighted
Partner
Partner

Re: Getselectedcount for filtered list box

But i don't know why it happening like this.

Can you explain me? why we need to use aggr() here?

Highlighted

Re: Getselectedcount for filtered list box

I am not entirely sure why, but Qlik Sense is unique in a way it works with calculated dimension using if statement... it is as if it creates a new field of it's own which can't really be used with some of the functions such as GetFieldCount() of GetFieldSelections() etc because it is not using the exact field and you cannot really use calculated dimensions in those functions.

Aggr behaves a little different... why? I am not sure... but it can pick the selection directly in the field... so that is why it works.

Highlighted
Partner
Partner

Re: Getselectedcount for filtered list box

Okay, Thanks sunny.