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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
greend21
Creator III
Creator III

Date Variable in Set Analysis

I tried a bunch of the other solutions that come up with similar questions that have been posted but nothing seems to work.

I have a variable that is vStartDate = Date('01/01/2019')

I want set analysis for  Sum(Amount) where SeqCreateDate >= vStartDate. If anyone could help I would greatly appreciate it.

 

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

I would store vStartDate as a number like this

Num(Date#('01/01/2019', 'MM/DD/YYYY'))

and then may be like this

Sum({<SeqCreateDate = {">=$(=Date(vStartDate, 'MM/DD/YYYY'))"}>}Amount)

or

Sum({<SeqCreateDate = {">=$(=Date($(vStartDate), 'MM/DD/YYYY'))"}>}Amount)

 

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

one thing you must do is to make sure vStartDate 

has the same format as SeqCreateDate 

than your expression should be 

Sum({<SeqCreateDate ={"<=$(vStartDate )"}>}Amount)

sunny_talwar
MVP
MVP

I would store vStartDate as a number like this

Num(Date#('01/01/2019', 'MM/DD/YYYY'))

and then may be like this

Sum({<SeqCreateDate = {">=$(=Date(vStartDate, 'MM/DD/YYYY'))"}>}Amount)

or

Sum({<SeqCreateDate = {">=$(=Date($(vStartDate), 'MM/DD/YYYY'))"}>}Amount)