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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Quick Set Analysis Question

Greetings,

I was wondering if anyone could help me out with a set analysis problem. I have two fields: SalesDate and Receiver. Both are selectable via multibox. I would like to present the Max(SalesDate) in a separate text box based on current Receiver.

Currently I have:

=Max( {$ <Receiver>} SalesDate )

This works fine until I change the SalesDate to something in the past. I'm sure this is a simple solution, I just need to be steered in the right direction. Any help would be appreciated. Thanks in advance.

1 Solution

Accepted Solutions
nicole
Contributor II
Contributor II

Maybe this:

Max({$<SalesDate=>} SalesDate)

View solution in original post

6 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think you need Set Analysis at all... Using basic QlikView functionality, the expression max(SalesDate) will return the max available SalesDate. If a specific Receiver is selected, the furmula will return the max Date associated with that specific Reciever.

Not applicable
Author

Thanks Oleg.

I'm still running into a problem when I change the SalesDate in the multibox though. If the max SalesDate is 1/31/2010 and I select the SalesDate 1/28/2010 in the multibox, then the max(SalesDate) function returns 1/28/2010.

I would like the returning value in the text box to be the max of the entire SalesDate set belonging to the selected Receiver, regardless of a change in date in the multibox.

Not applicable
Author

Would a screen shot help anyone?

nicole
Contributor II
Contributor II

Maybe this:

Max({$<SalesDate=>} SalesDate)

Not applicable
Author

How about this:

=max( {<SalesDate=>} SalesDate)

This would ignore any made selections for SalesDate

Not applicable
Author

Thank you! Works perfectly.