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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JohannSteyn
Frequent Visitor

Filter relative to current row

Hi all,
I need some help please. I think have this basic issue embedded in a more complex forumla.

 

I have the following columns: Date 1, Date 2, Amount.
I want to add a column with the sum of the amount when any Date 2 is larger (or equal) to the specific row's Date 1.

This is what I want (excel representation):

JohannSteyn_0-1639482081018.png

 

Please help with suggestions that I can use in DAX to add a column with the above result.

 

Thanks in advance

 

1 ACCEPTED SOLUTION

@JohannSteyn , Sorry, I think I reverted the logic

 

new column =
var _date = [Date1]
return
sumx(filter(Table, Table[Date2] >=_Date),[Amount])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@JohannSteyn , Try a new column like

 

new column =
var _date = [Date2]
return
sumx(filter(Table, Table[Date1] <=_Date),[Amount])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  Thanks for the suggestion. Unfortuntely that does not work (see below). Any other ideas?

JohannSteyn_0-1639484446744.png

 

@JohannSteyn , Sorry, I think I reverted the logic

 

new column =
var _date = [Date1]
return
sumx(filter(Table, Table[Date2] >=_Date),[Amount])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak working! You're awesome! Thank you

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.

Top Solution Authors