Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

exclude selections apart from 1 field

Hi,

can anyone tell me how to exclude current selections apart from 1 field.

I have the following expression..

=max({1}[EventDate])

That excludes all current selections, but how do i tell it to allow selections made on the EmpID field?

Thanks

10 Replies
Not applicable
Author

any ideas anyone?

vivientexier
Partner - Creator II
Partner - Creator II

Try this :

Create a variable as follow :

=Concat(EmpID, ', ')                   (don't forget the "=" sign)

Then, your expression :

Max({1 < EmpID={$(=vYourVariable)} >} [EventDate])

Not applicable
Author

hi, thanks for your reply..

i have tried this in a text box

=Max({1< [EventDate]={$(=vtest)}>} [EventDate])

but i get no result.

The above are my actual field names.

the variable vtest shows me the correct dates so i know this part works.

vivientexier
Partner - Creator II
Partner - Creator II

You mean :

=Max({1< EmpID={$(=vtest)}>} [EventDate])

?

Not applicable
Author

no, sorry, i mean i know the vtest variable displays the dates. it just doesnt work when i add the variable to the expression you gave... =Max({1< [EventDate]={$(=vtest)}>} [EventDate]).

Is it to do with the field being a date field?

Not applicable
Author

no, the empid was an example..

Not applicable
Author

i want to have a variable for the min and max [eventdate] but the user can change the [eventdate] range and the min and max needs to change with the new date selection.

vivientexier
Partner - Creator II
Partner - Creator II

The problem can be a format problem.

Convert your date to a numeric into your script, then, retry.

srinivasa1
Creator II
Creator II

Upload your sample app