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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.