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: 
seniorps
Contributor III
Contributor III

today() and analysis sets

Hi

I'm trying to calculate sales [tamount] dynamically for the past 90 days, from a larger set of data. The [tdated] field is a timestamped date field.

I can get it to calculate sales for 1 day, 90 days ago, by using a = sign in the expression, thus:

sum({$<[tdated]={'$(=timestamp(today()-90))'}>} [tamount])

but when I change the = sign to a > sign, I get nothing! i.e.

sum({$<[tdated]={'$(>timestamp(today()-90))'}>} [tamount])


Same thing happens if I use greater than or equal to...  >=


Am I missing something obvious here?


Thanks!

3 Replies
swuehl
MVP
MVP

Try

sum({$<[tdated]={">$(=timestamp(today()-90))"}>} [tamount])


Dates in Set Analysis

The Magic of Dollar Expansions

sunny_talwar

You can also try this:

Sum({$<[tdated]={'$(='>' & TimeStamp(Today()-90))'}>} [tamount])

seniorps
Contributor III
Contributor III
Author

Thanks - works perfectly!