Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shirleyc40
Creator
Creator

Counting number of records with date after current date selection

Hi. I am trying to find the number of quotes that started after the current date selection ( I have a calendar set up). The expression I use is Count({<StartTime= {">=$(getFieldSelections(eventDate))"}>} StartTime). I checked that getFieldSelections(eventDate) returns the correct date selections (say 6/4/2020). However, this expression returns 4 instead of 7

shirleyc40_0-1592227277878.png

 

Labels (1)
16 Replies
shirleyc40
Creator
Creator
Author

But I am trying to find the fields with a start date after the date picked by the user, and not necessarily the max of all dates

Kushal_Chawda

then try below

may be try creating variable and use it in set analysis

Create variable on front end as  vMaxDate  and put below expression

= date(getfieldselections(eventDate))

Now you can use your actual expression as below

Count({<StartTime= {">=$(vMaxDate)"}>} StartTime)

shirleyc40
Creator
Creator
Author

when a date is picked in the frontend, are all the calculations based off of the data that is related to that date? Like if I pick 6/4/2020, then the data that it searches through are the ones linked to 6/4/2020 (since that is what the filter does)?

Kushal_Chawda

yes. that's correct.

shirleyc40
Creator
Creator
Author

then is it still possible to search through all the data (not just the ones that relate to the date selection) to find those that are after the date selection? 

Kushal_Chawda

yeah. you can do that as well. 

shirleyc40
Creator
Creator
Author

Can you tell me how?