Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
yadhunandhanan
Partner - Contributor III
Partner - Contributor III

Min & Max Date

Hi Community,

I need to find first,second,third minimum & maximum date of property(Means PropertyID).

Previously I used this below method to find min & max date, but now i need to do this without taking resident. How to do this? Please help me to solve this

MinMaxDate:

Load

Property,

if(previous(Property)=Property and Count(Property) >2  , Min(Date)) as DateMin,

if(previous(Property)=Property and Count(Property) >2 , Min(Date,2)) as DateMax

resident PropData

Group By Property;

join(MinMaxDate)

Load

Property,

if(previous(Property)=Property and Count(Property) >2  , Min(Date,3)) as DateMin,

if(previous(Property)=Property and Count(Property) >2 , Min(Date,4)) as DateMax

resident PropData

Group By Property;

join(MinMaxDate)

Load

Property,

if(previous(Property)=Property and Count(Property) >2  , Min(Date,5)) as DateMin,

if(previous(Property)=Property and Count(Property) >2 , Min(Date,6)) as DateMax

resident PropData

Group By Property;

Thanks

7 Replies
philipp_kunz
Partner - Creator II
Partner - Creator II

You could try with the peek() function

Peek ‒ QlikView

Best of luck

mohamed_ahid
Partner - Specialist
Partner - Specialist

load your table ordering by date and use peek function as Philipp told you .

Not applicable

You can use

peek(DateMin)

peek(DateMax)

yadhunandhanan
Partner - Contributor III
Partner - Contributor III
Author

Thanks Abdulraj

yadhunandhanan
Partner - Contributor III
Partner - Contributor III
Author

Thanks philipp

yadhunandhanan
Partner - Contributor III
Partner - Contributor III
Author

Thanks Mohamed Ahid

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!