Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
bharani8
Creator III
Creator III

Max Date from each month should appear in my List box

Hi Experts - Kindly find my qvw file.. I have date field ... What i need is.. I need a list box in which it should show only the last date of each month... and that should be converted to a Month name...

Eg., in Aug if we have 29th Aug 2017, 30th Aug 2017, 31st Aug 2017... in my list box it should show only 31st Aug and it should appear as Aug-2017

36 Replies
swuehl
MVP
MVP

I would do it like this:

Set DateFormat ='M/D/YYYY h:mm';

Dates:

LOAD *,

If(Yday= floor(Monthend(Yday)), Monthname(Yday)) as Test;

LOAD * INLINE [

    Yday

    12/12/2017 0:00

    11/11/2017 0:00

    10/12/2017 0:00

...

Now the Test field can be used in the list box to select the last dates of every month:

2017-09-20 12_40_20-QlikView x64 - [C__Users_Stefan_Downloads_MaxDateTest.qvw_].png

bharani8
Creator III
Creator III
Author

Perfect!! Now working as expected NODISTINCT made the difference

Thanks for your time and patience to help me on this!!

bharani8
Creator III
Creator III
Author

Thanks Stefan!! I got the solution already.. will apply above logic incase required

tresesco
MVP
MVP

Glad that I could help. Please mark the threads 'helpful' which you feel so.

bharani8
Creator III
Creator III
Author

Actually am not able to do that since last few days.. when i click on that Action.. i see it keeps on loading... as shown below..

Mark as Helpful.PNG

tresesco
MVP
MVP

You might try with a different browser, may be? Anyway, it's not that important.

bharani8
Creator III
Creator III
Author

Hi Tresesco - I need one more field based on this logic... I have a Qtr field... Now if i select the Quarter.. i see all the dates pertaining to that qtr is getting selected .. but actual requirement is i need the max date (3 months) of those particular qtr to be selected.. Tried my best, couldn't solve.. Can u help plz ?