Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
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 (2)
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
Partner

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)

 

View solution in original post