Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

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

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)