Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

MIN, MAX with Selection pannel

Hi,

i got a problem with this:

I have a table in Qlik

Order     Date

1          01/01/2014

1          05/06/2015

1          06/07/2017

2          05/06/2017

2          06/07/2017

And i want to calculate two new columns with the min and max date of the Order.

I'm using an aggregate expression but when i select in a Selection pannel one date, it not works.

The result i need is:

When I select 05/06/2015 in a Selection pannel, the min of Order 1 must be 01/01/2014, and max of Order 1 must be 05/06/2015.

And to Order 2, the min must be 05/06/2017 and the maximum must be 05/06/2017.

Thanks in advance, any solution is welcome!

Regards.

Paula.

1 Solution

Accepted Solutions
stabben23
Partner - Master
Partner - Master

Hi,

perhaps something like this

table:

Load * inline [

Order,     Date

1 ,         01/01/2014

1,          05/06/2015

1,          06/07/2017

2,          05/06/2017

2 ,         06/07/2017

];

left join load
Order, min(date(Date)) as mindate, max(date(Date)) as maxdate
resident table
Group by Order;

View solution in original post

3 Replies
stabben23
Partner - Master
Partner - Master

Hi,

perhaps something like this

table:

Load * inline [

Order,     Date

1 ,         01/01/2014

1,          05/06/2015

1,          06/07/2017

2,          05/06/2017

2 ,         06/07/2017

];

left join load
Order, min(date(Date)) as mindate, max(date(Date)) as maxdate
resident table
Group by Order;

stabben23
Partner - Master
Partner - Master

or in front-end

Anonymous
Not applicable
Author

Thank you Staffan for your response,

it works correctly!

Regards.