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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.