Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Evan0211
Creator
Creator

Working with date subsets

I am going to try and explain this the best that I can.

I have a structure that has an ID, a start date and an end date.  The ID can have multiple start and end dates.

For example:

IDStartEnd
00011/1/20222/2/2022
00012/3/20223/3/2022
00013/4/20224/4/2022
00011/1/20242/2/2024

Now I have a few things I need to do with these dates.

I have written an expression to look for the dates within the next 365 days, which works fine.  However, I also need to count how many dates are remaining regardless of if they are within the next 365 days.  I am trying to use this expression:

=Count({$<[PERF_START_DATE] = {">=$(=timestamp(now()))"}>} [PERF_START_DATE])

But it is only including the dates within 365 days, which I assume is because I limited the set of data to 365 days on default by using this

=Count({$<[PERF_END_DATE] = {">=$(=timestamp(now()))<=$(=timestamp(now() + 365))"}> .....} [ID])

I am still trying to figure out how QLIK data works, but it is my assumption that because my table is set to show the dates ending within the next year, when I try and count all of the start dates that are in the future, it only counts them within the next 365 days.

Additionally, I need to show the FINAL end date but I am having an issue using MAX.  Once again, it is showing the final date within the 365 days, but not the final date for the ID. 

Sorry if this is confusing.  Any ideas?

Thanks in advance

0 Replies