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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ignore Any Selection

I have the below expression where I am calculating the min count of email address in 60 days but I can't seem to figure out how to ignore any selections on the date fields?

=min(aggr(count({$<[Inquiry Date] = {">=$(=Date(Max([Inquiry Date])-60)<=(=Date(Max([Inquiry Date]))))"},[Inquiry Date]=,[Inquiry Week]=, [Inquiry Month]=, [Inquiry Year]=>}[Email Address]),[Inquiry Date]))

Thanks in advance!

-Jason

Labels (1)
13 Replies
Not applicable
Author

Unfortunately not at the moment.

I think I finally cracked it! The date(max([Inquiry Date])) that was nested inside the set analysis was causing the max and max-60 date to fluctuate. So I did this:

Min({$<[Inquiry Date] = {">=$(=Date(Max({<[Inquiry Date], [Inquiry Week], [Inquiry Month], [Inquiry Year]>}[Inquiry Date])-60))<=$(=Date(Max({<[Inquiry Date], [Inquiry Week], [Inquiry Month], [Inquiry Year]>}[Inquiry Date])))"}, [Inquiry Week], [Inquiry Month], [Inquiry Year]>} Aggr(Count({$<[Inquiry Date] = {">=$(=Date(Max({<[Inquiry Date], [Inquiry Week], [Inquiry Month], [Inquiry Year]>}[Inquiry Date])-60))<=$(=Date(Max({<[Inquiry Date], [Inquiry Week], [Inquiry Month], [Inquiry Year]>}[Inquiry Date])))"}, [Treatment Code]={'*'},[Treatment Name]={'*'},[Inquiry Week], [Inquiry Month], [Inquiry Year]>}[Email Address]),[Inquiry Date]))

Now it completely ignores any of the date fields

I wonder if there is an easier/simpler approach to this.

sunny_talwar
MVP
MVP

May be you want to ignore not just the date fields, but all selections. If that's true then this can work:

Min({1<[Inquiry Date] = {">=$(=Date(Max({1}[Inquiry Date])-60))<=$(=Date(Max({1>}[Inquiry Date])))"}>} Aggr(Count({1<[Inquiry Date] = {">=$(=Date(Max({1>}[Inquiry Date])-60))<=$(=Date(Max({1}[Inquiry Date])))"}, [Treatment Code]={'*'},[Treatment Name]={'*'}>}[Email Address]),[Inquiry Date]))

Not applicable
Author

That's a good suggestion and one I'll definitely keep for the books!

In this instance I need all other field selections to work except date fields.

sunny_talwar
MVP
MVP

Just to give another suggestion, you can use the trick, i specified here:

Re: Detaching Individual Selections