Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

napac1458
Contributor II

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

Re: Find max value within a date range

How about this:

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

4 Replies

Re: Find max value within a date range

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

napac1458
Contributor II

Re: Find max value within a date range

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))

Re: Find max value within a date range

How about this:

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

napac1458
Contributor II

Re: Find max value within a date range

That works!! Thank you so much Sunny!!

Community Browser