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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Max and Min of Dates

Hi All,

I have a data sheet like this below.

Need to show the unique IDs, where the Create Date is Max for that IDs and if there are multiple Deliver Date for that Create Date, show the Min of Deliver Date

How to write the Load Script?

SOURCE:

IDsCreate DateDeliver Date
100-102/152/18
100-102/162/19
100-102/162/20
100-203/223/27
100-203/233/28

RESULT:

IDsCreate DateDeliver Date
100-102/162/19
100-203/233/28
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi DMohanty,

I got your problem now. Here is your solution mate. Please find attached files.

Please let me know whether it worked or not.

Thanks,

Ritesh Pathak

View solution in original post

11 Replies
dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi All,

Any help here please

Anonymous
Not applicable

Hi DMohanty,

I think you need below result:

IDsCreate DateDeliver Date
100-102/162/18
100-203/233/27

because you say that you want min of Deliver Date.

Please find solution attached. Hopefully it should work.

Cheers,

Ritesh Pathak

Anonymous
Not applicable

Hi DMohanty,

Has it worked?

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Ritesh,

Thank you for help.

But exactly this is not my solution. I need like this.

IDsCreate DateDeliver Date
100-102/162/19
100-203/233/28

Because of the Create Date = 2/16, Min Delivery Date would be 02/19 (not 02/18)

and for Create Date = 2/23, Min Delivery Date would be 02/28 (not 02/27)

Any more help please

Anonymous
Not applicable

What do you mean by Min Delivery Date? I understood 'Minimum', do you mean something else e.g. Mid date or something?

Please explain. That would help me in understanding your problem better.

dmohanty
Partner - Specialist
Partner - Specialist
Author

Not Mid Date.

I mean,

      the corresponding Min Delivery Date of the Max Create Date.

If you look into the source, for 100-10, the Max Create Date is 2/16. And for 2/16, the corresponding Min Delivery Date is 2/19. (not 2/18)

Similarly for 100-20. the Max Create Date is 3/23 and there is single Delivery Date for that corresponding Create Date i.e 3/28. So this treated as Min for this ID.

Hope this is clear.

Anonymous
Not applicable

Hi DMohanty,

I got your problem now. Here is your solution mate. Please find attached files.

Please let me know whether it worked or not.

Thanks,

Ritesh Pathak

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hey Ritesh,

Many thanks for the efforts. Surely have the results that was needed.

Le me know implement at my full data set and will let know.

Regards!

Anonymous
Not applicable

Cheers mate. If it works. Please mark this solution as 'Correct Answer' so that thread could be closed.

Regards,

Ritesh Pathak