Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save $300 - Register for QlikWorld (formerly Qonnections) by January 31st: Learn More
greend21
Contributor II

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 (3)
1 Solution

Accepted Solutions

Re: Date Variable in Set Analysis

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
Partner
Partner

Re: Date Variable in Set Analysis

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)

Re: Date Variable in Set Analysis

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