Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with MinMax

Hi All,

I am trying to calculate the earliest and the latest date using the max and min function.

So the script I'm writing looks like this:  

MinMax:

LOAD
Min([MM-YYYY]) AS MinDate,
Max([MM-YYYY]) AS MaxDate
Resident [(Sheet1...)];

However, when I load it and go to the UI the fields are available but they do not generate any values.

Please can you help me with this? Let me know if you need for info in order to help me.

Thanks in advance,

Alison

12 Replies
CarlosAMonroy
Creator III
Creator III

‌left and rigth functions take the number of characters you input in the parameters.

So, in order to take just the year from MM-YYYY field. I use rigth as the star point and then use the number 4 to take just 4 characters. and then do the same for the month, but now I want to start from the left side.

Not applicable
Author

Great, thanks a lot!

oscar_ortiz
Partner - Specialist
Partner - Specialist

I would use caution when using the Min and Max functions, sure it works well with a small table, but a on a very large table it can take quite a long time.  I know it's taught in class but it's not necessarily the best method of taking care of this.

If you look at rwunderlich‌ post https://qlikviewcookbook.com/2015/05/better-calendar-scripts/‌ you'll see he talks about this in quite a bit of detail.

265855.PNG

Good luck

Oscar