Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
pageomet
Contributor
Contributor

Set Analysis

Hi;

I'm trying to count all approved dealers with a listingdate > registrationdate.  How do I count everything that the current selection excludes?  See formula below:

=count(Aggr(if(Max(TOTAL LISTINGDATE), DEALER) >  REGISTRATIONDATE, DEALERSTATUS = 'Approved' ,DEALER))

Thanks,

Ometrice Page

Labels (1)
5 Replies
Anonymous
Not applicable

count({$<DEALER=P({$<LISTINGDATE={">REGISTRATIONDATE"}>}DEALER)>}DEALER)

depending on your data model, you may need:

count({$<DEALER=P({$<LISTINGDATE={">REGISTRATIONDATE"}>}DEALER)>}distinct DEALER)

Not applicable

Hi Ometrice!

Steve is right, except he forgot the DEALERSTATUS in his SET expression:

count({$<DEALER=P({$<LISTINGDATE={">REGISTRATIONDATE"}, DEALERSTATUS = {'Approved'}>}DEALER)>}DEALER)

Anonymous
Not applicable

Nice catch!

pageomet
Contributor
Contributor
Author

How do I exclude the counts from the current selection?

Anonymous
Not applicable

Try this:


count({1-$<DEALER=P({1-$<LISTINGDATE={">REGISTRATIONDATE"}, DEALERSTATUS = {'Approved'}>}DEALER)>}DEALER)