Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Find max value within a date range

Hello,

I'm trying to find the max value within a certain date range that I have set dynamically using set analysis.

For example,  in the table below I have a date range, set to go back a certain amount of days based on the max date, along with the individual sums for those days. 

What I'm trying to figure out is how to get the max value for the date range.

   

   

Date7/10/20167/9/20167/8/20167/7/20167/6/20167/5/20167/4/20167/3/2016
individual433232312321452432292444
max452452452452452452452452

Any ideas?

Thank you for your help.

1 Solution

Accepted Solutions
sunny_talwar

How about this:

Max(TOTAL Aggr(Sum({<YourSetAnalysis>} individual), Date))

View solution in original post

4 Replies
sunny_talwar

May be like this:

Max(TOTAL {<YourSetAnalysis>} individual)

Here YourSetAnalysis and individual are placeholders and replace them with what you have for set analysis and fieldname, respectively

Anonymous
Not applicable
Author

Thank you for the reply Sunny.  This is close I feel, however the "individual" values are the result of a SUM function, which doesn't appear to work with MAX before it:

max(total sum({<Set Analysis>} individual))

sunny_talwar

How about this:

Max(TOTAL Aggr(Sum({<YourSetAnalysis>} individual), Date))

Anonymous
Not applicable
Author

That works!! Thank you so much Sunny!!