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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
zied_ahmed1
Specialist
Specialist

Sum between two dates

Hi,

I´m having some problems trying to have the value between two different time periods selected by the user.

For example if I choose a first periode : (17/02/2013 and date 17/02/2013) and a second periode : ( (17/03/2013 and date 17/04/2013) ) i will have the value of sales between these two periodes

How to fix it please

6 Replies
neelamsaroha157
Specialist II
Specialist II

You can create two variables for the start Input Date and End Input date and then use the

Sum(({<Date ={">=$(vStartDate)<=$(vEndDate)"}>}, Measure)  in your calculation.

Hope this helps

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey there,

Can you provide some sample data? And/or provide a better explanation of your problem?

Regards,

MB

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

I guess you have one calendar or Date field. If I am right than your database should look like table object below:

Screenshot_3.png

And your expression would be:

=sum(

{$<

  Date = {">=$(=min(Date))<=$(=max(Date))"}

>}

Value)

Check the application I've attached.

neelamsaroha157
Specialist II
Specialist II

Here is the attachment..Hope this helps..

miguelbraga
Partner - Specialist III
Partner - Specialist III

Is this what you want?

Regards,

MB

Not applicable

Sum(({<Date ={">=$(vfirstStartDate)<=$(vfirstEndDate)"}>}, sales)  +

Sum(({<Date ={">=$(vsecondStartDate)<=$(vsecondEndDate)"}>},sales)