Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Label/Expression Mix Max Date

Hi! I'd like to show in a label the minim and the maxumum of my date fields. The format field is YYYY/MM.

I'm trying to use these functions: MinString and Max String.

But if my range field is from 2010/1 to 2013/11, these functions show me this result from 2010/1 to 2013/9.

There is another function to calculate the correct result from 2010/1 to 2013/11?

Any suggestions greatly appreciated.

Andrea

4 Replies
swuehl
MVP
MVP

Your dates should be dual values, having a number representation:

http://community.qlik.com/blogs/qlikviewdesignblog/2013/02/19/why-don-t-my-dates-work

Then you can use numeric functions like min() and max(), to create your label and format as needed, something like

=Date(min(DateField),'YYYY-MM') & ' to ' & Date(max(DateField),'YYYY-MM')

Not applicable
Author

Thank you so much for your help!

Could you maybe help me with an example pls?

I'm trying to use this expression with the example attached.

I really appreciate any help you can provide.

swuehl
MVP
MVP

I think your problem is still that your dates are not correctly parsed in. Have you read Henric's blog post and the pdf linked in his post?

If you parse the dates correctly e.g. using the date#() function, your expression just starts to work. Check attached.

Not applicable
Author

Thank you!