Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
nehasaxena
Creator II
Creator 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
Creator III
Creator III

try this

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

Not applicable

Hi,

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

Thanks

tresesco
MVP
MVP

Try like:

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

praveenak
Partner - Contributor II
Partner - Contributor II

Hi Neha,

Try the below expressions,

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

Thanks

vinieme12
Champion III
Champion III

just this will do

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
praveenak
Partner - Contributor II
Partner - Contributor II

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
Champion III
Champion III

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
nehasaxena
Creator II
Creator II
Author

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

nehasaxena
Creator II
Creator II
Author

This expression is not working