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: 
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
Champion III
Champion III

Try

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


Dates in Set Analysis

The Magic of Dollar Expansions

sunny_talwar
MVP
MVP

You can also try this:

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

seniorps
Contributor III
Contributor III
Author

Thanks - works perfectly!