Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis

Hello,

The expression as below is woks fine that sum the amount >=vBDate and <=vEDate. How can I change the expression to sum the amount that >=vBDate and <=vEdate-1 (day before the vEdate)?

vBdate and vEDate are import date range.

=Sum({<[Entered Date]={">=$(vBDate)<=$(vEDate)"}>}[SC Amount])

Thanks



5 Replies
Anonymous
Not applicable
Author

Try this:

Sum({<[Entered Date]={">=$(vBDate)<=$(=vEDate-1)"}>}[SC Amount])

Not applicable
Author

Hi, you can also do it this way:

Sum({<[Entered Date]={">=$(vBDate)<$(=vEDate)"}>}[SC Amount])

Not applicable
Author

Hi Michael,


I tried it but it does not work. It ignored the vEdate-1 condition and sum amount that >=vBdate.

Anonymous
Not applicable
Author

Most likely a formatting issue. When you add -1, the date format converts to integer. This should work:
=sum({$<[Entered Date]={">=$(=date(vBDate))<=$(=date(vEDate-1))"}>} [SC Amount])
I prefer this, it should work the same way:
=sum({$<[Entered Date]={">=$(=date(vBDate))"} * {"<=$(=date(vEDate-1))"}>} [SC Amount])

(I have similar expressions, they do work)

Not applicable
Author

Thanks Michael,


It works right now.