Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Exclude Values from Set Analysis

Hello,

I have the following expression with Set Analysis:

=MAX(IF(AGGR(NODISTINCT MAX(SALE_DATE),STORE)=SALE_DATE,CONTRACT))

Which brings me the last Contract for a Max Date by Store.

I need to exclude 2 values with Set Analysis from field STATUS, values: Restored (capital letter) and restored (lowercase).

Could I exclude both at once? Or do I have to specify each one?

Thank you!!!

1 Solution

Accepted Solutions
sunny_talwar

May be this

=MAX({<STATUS -= {'Restored', 'restored'}>} IF(AGGR(NODISTINCT MAX({<STATUS -= {'Restored', 'restored'}>} SALE_DATE),STORE)=SALE_DATE,CONTRACT))

View solution in original post

4 Replies
sunny_talwar

May be this

=MAX({<STATUS -= {'Restored', 'restored'}>} IF(AGGR(NODISTINCT MAX({<STATUS -= {'Restored', 'restored'}>} SALE_DATE),STORE)=SALE_DATE,CONTRACT))

microwin88x
Creator III
Creator III
Author

Thank you Sunny.

Do you think it would be necessary to add the Status filter on both sides? Or it would be Ok with the 1st one?

sunny_talwar

It's safe to add it in both places... but it might work with one... I am not sure... will have to tested out.

microwin88x
Creator III
Creator III
Author

Thanks!