Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
erieqlik
Contributor III
Contributor III

Want most recent record for each day (date) for multiple projects

I have a history table with the following: project name, status, create date (of status), and a bunch of other fields.

I want the most recent record for each project name & project type.

Data:

Load * inline [

project name, status, create date

Alpha, Backlog, 2/16/2024 1:41:31 PM

Alpha, Approved, 2/16/2024 1:45:13 PM

Alpha, In Progress, 2/16/2024 1:57:45 PM

Alpha, Completed, 2/19/2024 3:45:33 PM

Beta, Backlog, 2/1/2024 9:01:01 AM

Beta, In Progress, 2/1/2024 4:01:54 PM

Beta, Backlog, 2/7/2024 8:02:12 AM

Beta, Approved, 2/12/2024 12:10:17 PM

Beta, Completed, 2/12/2024 2:44:59 PM

];

My result table should show just these data points…

Alpha, In Progress, 2/16/2024 1:57:45 PM <- this was the last thing that happened on 2/16

Alpha, Completed, 2/19/2024 3:45:33 PM <- this was the only thing that happened on 2/19

Beta, In Progress, 2/1/2024 4:01:54 PM <- this was the last thing that happened on 2/1

Beta, Backlog, 2/7/2024 8:02:12 AM <- this was the only thing that happened on 2/7

Beta, Completed, 2/12/2024 2:44:59 PM <- this was the last thing that happened on 2/12

My actual data has many more columns – how would I preserve that data?

 

 

 

 

 

Labels (1)
10 Replies
igoralcantara

Your Create Date is not a date field but a timestamp. In order to get the last event in each day, I need a field that is just a date, without the time. All date/time values in Qlik are numbers. Decimals represent the time and integer represent the days. So, I round it (Floor) to remove the time and get just the date.

You don't see it in the data model because I drop it in line 36. Comment that line and you will see it.

Check out my latest posts at datavoyagers.net