
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using a Date Variable in Set Analysis
Hi there,
I'm hoping this is a simple answer. I have a Set Analysis query which is pulling through worker shift information to see if they have used our clocking in device:
Count({$<LogInKiosk = {'Yes'}}>}$VisitReference)
This works all fine, however I want to be able to only look at visits before today. I have a variable called vLogDate which returns the correct date but when I add it to the following
Count({$<LogInKiosk = {'Yes'},, VisitStartDate = {"<=$(vLogDate )}>}$VisitReference)
It doesn't return any information.
Any help would be great.
James
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to have a closing double quote in your expression:
Count({$<LogInKiosk = {'Yes'}, VisitStartDate = {"<=$(vLogDate)"}>} $VisitReference)
Also, make sure that the variable has the right date format. https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511
HIC

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to have a closing double quote in your expression:
Count({$<LogInKiosk = {'Yes'}, VisitStartDate = {"<=$(vLogDate)"}>} $VisitReference)
Also, make sure that the variable has the right date format. https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511
HIC

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ahhh the missing quotation!!!!
Thank you, all sorted now 🙂
