Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

Min and max dates

Hi all.

I have a table like this

EIDFROMTO
A2017-12-212019-05-07
A2018-05-082018-05-08
A2018-05-092018-07-31
A2018-08-012019-09-30
B2018-04-032018-07-27
B2018-08-272019-01-24
B2018-08-272019-07-31

 

and I would like the result look like this

EIDFROMTO
A2017-12-212019-09-30
B2018-08-272019-07-31

 

My coding skills are limited, is there anyone who can guide me here, please?

8 Replies
Highlighted
Creator
Creator

Re: Min and max dates

Hi, Do you want to display Min or Max From date ? I see that you are displaying Min From date for EmpId A and Max From date for EmpID B. Could you please clarify.
Highlighted
MVP
MVP

Re: Min and max dates

Create a table/pivot with EID as the dimension; Min(FROM) and Max(TO) as expressions/measures.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Contributor III
Contributor III

Re: Min and max dates

Sorry, I was unclear. I want Min FROM date for the last unbroken date range, which for B also happens to be Max FROM date.

Highlighted
Contributor III
Contributor III

Re: Min and max dates

Thanks, but wouldn't that give me 2018-04-03 for B which is not the date I want?

Partner
Partner

Re: Min and max dates

Hi 

 

Please have a look over the attached qvw file.

 

This might solve your problem.

 

Thanks

Nilaksh Mahajan

Highlighted
Contributor III
Contributor III

Re: Min and max dates

Thanks, but that's not really what I'm looking for. Max for B should be 2018-08-27.

Any other suggestions?

Highlighted
Partner
Partner

Re: Min and max dates

Hi

 

Please find the attached file.  (Final Table)

I am able to achieve what you need.

Highlighted
Contributor III
Contributor III

Re: Min and max dates

Thanks again for your efforts, but it's still not really the solution I'm looking for, I have hundreds of IDs and thousands of rows in my table.