Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor

Qlik Sense measure expression between two dates

Hi,

I have an app where I'm trying to display the sum of sales over the past 3 months
there is 1 table with sales & dates, and 1 table with date values (+ first day of month 3 months ago +last day of last month)
I use the following expression:

"    Sum({<Date={">=3MonthsAgo <=LastMonthEnd"}>} Sales)    "

but it does not work. When I replace 3MonthsAgo and LastMonthEnd with a random date ("1/1/2017") it does work.
Is my expression wrong?

Labels (2)
4 Replies
Highlighted
Master III
Master III

Maybe like this Sum({<Date={">=$(Monthstart(3MonthsAgo)) <=$(Monthend(LastMonthEnd))"}>} Sales)

Highlighted
Contributor
Contributor

Unfortunately that doesn't work either 😕


when the 2 tables are not linked:

AnnieV_0-1592909023881.png

 

when the 2 tables are linked:

AnnieV_1-1592909200221.png

 

the expressions editor shows this:

AnnieV_2-1592909260486.png

 

Highlighted
Master III
Master III

Can you share the sample app and the output you are expecting?

Highlighted
Creator III
Creator III

Hi,

try like below expression

Sum({<Date={">=$(=date(MonthStart(today()-90),'DD/MM/YYYY'))<=$(=date(MonthEnd(today()),'DD/MM/YYYY'))"}>}Sales)

 

 

Thanks,

Nitin.