Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum where one date field is greater than second date field used as dimension

Hi, I have two tables, one has a date field (OperatingDate) and a value associated with each date (Sales).  The second is a calendar with daily date field (Date).  I'd like to create a table with Date as the dimension, and the sum of all Sales where OperatingDate is >= the Date value in that row.  Tried to put an illustration of what I'm looking for below, any help would be appreciated!

OperatingDateSales
8/4/201710
8/5/201720
8/6/201715
8/10/20175

Date
8/4/2017
8/5/2017
8/6/2017

DateSum(Sales)
8/4/201750
8/5/201740
8/6/201720
1 Solution

Accepted Solutions
sunny_talwar

May be this

=Sum(If(Date <= OperatingDate, Sales))

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

May be this

=Sum(If(Date <= OperatingDate, Sales))

Capture.PNG

Anonymous
Not applicable
Author

That worked, thank you!

sunny_talwar

Awesome, please close the thread by marking the correct response.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny