Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

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
Master
Master

Re: MIN, MAX with Selection pannel

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
Master
Master

Re: MIN, MAX with Selection pannel

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

Highlighted
Master
Master

Re: MIN, MAX with Selection pannel

or in front-end

Highlighted
Contributor III
Contributor III

Re: MIN, MAX with Selection pannel

Thank you Staffan for your response,

it works correctly!

Regards.