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

Using a Max and Min Date Variable in set analysis

I can't seem to get this set analysis working. I'm selecting a range of months from a list box and using two variables to get the maximum and minimum dates from my selection.

If I use them in the following expression I find the minimum formula works fine but the maximum formula is not working and if I reverse the formula the maximum works fine and the minimum doesn't!

sum ({<NL_Month = {'<=$(vMaxNL_Month'), NL_Month = {'>=$(vMinNL_Month)'} >} NL_Value

Any suggestions in how to pick up just the NL_Value between the minimum and maximum month?

1 Solution

Accepted Solutions
Not applicable
Author

Hi Andy,

try this:

sum ({<NL_Month = {"<=$(vMaxNL_Month')>=$(vMinNL_Month)"} >} NL_Value)

Good luck!

Rainer

View solution in original post

2 Replies
Not applicable
Author

Hi Andy,

try this:

sum ({<NL_Month = {"<=$(vMaxNL_Month')>=$(vMinNL_Month)"} >} NL_Value)

Good luck!

Rainer

Not applicable
Author

Rainer

Thank you - this worked fine after taking the stray ' out after vMaxNL_Month!

Cheers