Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
FabioManniti
Contributor III
Contributor III

Incremental sum and date reaches a value

Hello I have a table like this:

user_id sale sale_date
a1 100 2022-01-03
a2 120 2022-01-07
a3 140 2022-02-27
a4 160 2022-03-02
b1 300 2022-01-13
b2 90 2022-04-14
c1 100 2022-05-12
c2 250 2022-06-03
c3 400 2022-08-11

 

I would like to know for each user the minimum date they reach the 300€ sales threshold:

user_id sale sum(sale) sale_date
a1 100 100 2022-01-03
a2 120 220 2022-01-07
a3 140 340 2022-02-27
a4 160 500 2022-03-02
b1 300 300 2022-01-13
b2 90 390 2022-04-14
c1 100 100 2022-05-12
c2 250 350 2022-06-03
c3 400 750 2022-08-11

 

So, in the end, I can have a table like this:

user_id goal_date
a1 2022-02-27
b1 2022-01-13
c1 2022-06-03

 

Can you please help me?
Do I have to do this at the editor level or I can do in the sheet level?

Labels (1)
1 Reply
BrunPierre
Partner - Master
Partner - Master

Elaborate on the "sum(sale)" column.