Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

New Contributor II

today() and analysis sets


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?


3 Replies

Re: today() and analysis sets


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

Dates in Set Analysis

The Magic of Dollar Expansions

Re: today() and analysis sets

You can also try this:

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

New Contributor II

Re: today() and analysis sets

Thanks - works perfectly!

Community Browser