Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
CSmith_HW
Frequent Visitor

DAX Help! Return date that cumulative total surpassed a column value

Hi guys,

 

I have a campaign table that look like the below:

 

Campaign IDTarget Price
1£50,000
2£70,000
3£120,000
4£35,000

 

and a table of deals that looks like:

Deal IDCampaign IDPriceDate
11£5,00008/02/2021
22£7,00024/12/2020
32£11,00012/01/2021
43£13,50030/10/2020
51£3,50001/02/2021

 

The 2 tables are joined in a 1-to-many via campaign ID. Now, what I would like to do, preferably in a calculated column on the campaign table is return the date at which the cumulative sum of "Price" surpassed the Target Price.

So the logic would look something like this:

  1. Use the date on the deal table to create a cumulative running total of all deals for each campaign.

  2. Monitor when the cumulative running total surpasses the target price

  3. Return the date that final deal happened to take us over the target price

 

Any help would be great,

Thanks

1 ACCEPTED SOLUTION
rfigtree
Resolver III
Resolver III

hi i have a problem understanding context transition but i think this works.

probably a much neater way of doing it.

had to fiddle your data as none of the targets met as you put them.

 

rfigtree_0-1613135259887.pngrfigtree_1-1613135286220.png

 

View solution in original post

2 REPLIES 2
rfigtree
Resolver III
Resolver III

hi i have a problem understanding context transition but i think this works.

probably a much neater way of doing it.

had to fiddle your data as none of the targets met as you put them.

 

rfigtree_0-1613135259887.pngrfigtree_1-1613135286220.png

 

Yep I used dummy data in my example - it works though thanks!

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)