Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
nehasaxena
Contributor II

exclude values of current selection in set analysis

Hi All,

I have a requirement to display the count of team members for all the managers other than selected manager.

I have written this expression - Count(DISTINCT{<manager-={'$(VGetManager)'}>} memberid)

Variable VGetManager = GetFieldSelections(manager)

But this is working exactly opposite. If i select manager name than it gives me count of members associated with that manager. I want the count of not associated members.

I read about P and E function but not understand how to use in my case.

Please suggest the expression.

Thanks.

Regards,

Neha

10 Replies
dsharmaqv
Contributor III

Re: exclude values of current selection in set analysis

try this

Count(DISTINCT{<manager={'*'}-{'$(VGetManager)'}>} memberid)

Not applicable

Re: exclude values of current selection in set analysis

Hi,

Use '1-$' in place of '$' this will give you excluded results,

Thanks

MVP
MVP

Re: exclude values of current selection in set analysis

Try like:

Count(DISTINCT{<manager=-$::manager>} memberid)

Partner
Partner

Re: exclude values of current selection in set analysis

Hi Neha,

Try the below expressions,

count({$<manager=E({<manager={$(=getfieldselections(manager))}>}manager)>}memberid)

Thanks

vinieme12
Esteemed Contributor II

Re: exclude values of current selection in set analysis

just this will do

Count(DISTINCT{<manager=E(manager)>} memberid)

Partner
Partner

Re: exclude values of current selection in set analysis

Hi Vineet,

Not an offense but your expression will show 'No data to display' when there is no selection made in the filed 'manager'

Thanks

vinieme12
Esteemed Contributor II

Re: exclude values of current selection in set analysis

None taken; but there is no need to complicate it unnecessarily it's for the OP to decide what he want

nehasaxena
Contributor II

Re: exclude values of current selection in set analysis

Thanks Vineeth. I used this because we want to show data only when manager is selected.

nehasaxena
Contributor II

Re: exclude values of current selection in set analysis

This expression is not working