Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mrbustin
Contributor II
Contributor II

Stuck - Can't form proper set expression for date range via input box

I cannot figure out the proper syntax to get the proper set of records between a date range using two variables and input boxes.

I created vStartDate and vEndDate variables and capture them via two input boxes and then use date#  to convert to dates but -cannot not get it to work... any helpwould be greatly appreciated. -Mark

count({$<ReceivedDate = {">= date#('$(vStartDate)','MM/DD/YYYY') <= date#('$(vEndtDate)','MM/DD/YYYY') "}>} TrackingNumber)

1 Solution

Accepted Solutions
kenphamvn
Creator III
Creator III

Try this

count({$<ReceivedDate = {">=$(= date#($(vStartDate),'MM/DD/YYYY'))

<=$(=date#($(vEndtDate),'MM/DD/YYYY')) "}>} TrackingNumber)

Best regards,

An Pham

View solution in original post

2 Replies
kenphamvn
Creator III
Creator III

Try this

count({$<ReceivedDate = {">=$(= date#($(vStartDate),'MM/DD/YYYY'))

<=$(=date#($(vEndtDate),'MM/DD/YYYY')) "}>} TrackingNumber)

Best regards,

An Pham

mrbustin
Contributor II
Contributor II
Author

Thank you An!

I got it to work after making one tweak to your formula, I had to enclose the $expansion of each variable in single quotes:

count({$<FOIAType={'Request'},Status={'Closed'},DateReceived = {">=$(= date#('$(vStartDate)','MM/DD/YYYY'))<=$(=date#('$(vEndDate)','MM/DD/YYYY'))"}>} TrackingNum)

Thanks again An - I was banging my head against the wall

-Mark