Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

QlikWorld online is next week! REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 

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:


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