Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum Date range

Hello,

I want to sum up to today -1 but in the example bellow I'm getting 0.

i'm trying:

=sum({$<S_Date={'>=$(=Date(min(S_Date)))<=$(=Date(today()-1)))'}>}Sales_limit)

sum from 16/05 to 23/05.

how can I do that?

Tks

  

S_DateSales_limit
16/05/201810
17/05/201820
18/05/201830
19/05/201840
20/05/201850
21/05/201860
22/05/201870
23/05/201880
24/05/201890
25/05/2018100
26/05/2018110
27/05/2018120
28/05/2018130
29/05/2018140
30/05/2018150
1 Solution

Accepted Solutions
PrashantSangle

bro you have extra closing in set analysis check

try below

sum({$<S_Date={">=$(=Date(min(S_Date)))<=$(=Date(Today()-1))"}>}Sales_limit)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

8 Replies
pradosh_thakur
Master II
Master II

Your field must be a date

=sum({$<S_Date={">=$(=Date(min(S_Date)))<=$(=Date(today()-1)))"}>}Sales_limit)

Learning never stops.
jonathandienst
Partner - Champion III
Partner - Champion III

Try this:

=Sum({<S_Date = {">='$(=Date(min(S_Date)))' <='$(=Date(today()-1))'"}>} Sales_limit)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

which field? could you give an example please?

tks

Anonymous
Not applicable
Author

tried but no success.

Follow the qvw.

tks

PrashantSangle

as jonathan suggested try with " (double quote).

It will work.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

tried but no success.

PrashantSangle

bro you have extra closing in set analysis check

try below

sum({$<S_Date={">=$(=Date(min(S_Date)))<=$(=Date(Today()-1))"}>}Sales_limit)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Sorry, I just copied from Joanthan's post.

Try this:

=Sum({<S_Date = {">='$(=Date(min(S_Date)))' <='$(=Date(today()-1))'"}>} Sales_limit)


But no problem, Now i'ts working.

Why in this case should I use with double quotes?

Tks