Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jcampbell474
Creator III
Creator III

Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable

Good day, everyone.

I working on an app and encountered two issues that I initially thought would be easy to solve.  Any help would be greatly appreciated.

Issue #1:

I need to get the number of days difference between two dates it equals 0, 1, 2, 3, and >3.  I've tried many different variations of this expression (and others completely different). 

=count({<MaxString([ASN Scan Date])-MinString([ASN Scan Date])=0>} Distinct([ASN Number])) 

Everything I try seems to get hung up on the Max-Min date part. 

Issue #2:

I'm loading hundreds of thousands of records from many tables.  To control the amount of data being retrieved, I use this statement:

and rma.row_create_dt > '12-12-31 23:59:00.000'

which works perfect.  However, there are many tables and I would like to use a variable in place of the date/time.  I use:

Let vstart = '12-12-31 23:59:00.000', then rma.row_create_dt > $(vstart). 

The script always stops, saying it doesn't recognize something.  What is wrong with the syntax?

Thank you!

10 Replies
sunny_talwar

Awesome! I am glad you were able to figure it out.

Best,

Sunny