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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the minimum and maximum selected values

How do I get the minimum and maximum selected values from a list box?

I have a list box filled with dates.  I want to find the minimum date selected and the maximum date selected.  Here is an example

Let us say I have 10 selected dates.

1/5/2012

1/6/2012

1/7/2012

1/8/2012

1/9/2012

1/26/2012

1/27/2012

1/28/2012

1/29/2012

1/30/2012

I want to get 1/5/2012 for my minimum and 1/30/2012 for my maximum.

Second part.  What would the expression look if I wanted to sum a field for all the days between my minimum and maximum range of selected dates?  So between 1/5/2012 AND 1/30/2012.

Thanks in advance

1 Reply
MayilVahanan

HI

=sum({<Date = {'>=$(=vMin)<=$(=vMax)'}>}Sales)

where vMin = Min(Date)

vMax = Max(Date)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.