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: 
JamesMF82
Contributor II
Contributor II

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

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

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

View solution in original post

2 Replies
hic
Former Employee
Former Employee

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

JamesMF82
Contributor II
Contributor II
Author

Ahhh the missing quotation!!!!

 

Thank you, all sorted now 🙂