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

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

Reply
electrobrit
Post Patron
Post Patron

Dax to sum the total using a relative date with a filter

This seems kind of simple but I can't get it to work using a relative date filter and another filter.
I have a table with a close date and status. 
If the status = Closed and close date is in last 2 months, I need to sum the total.  

NameClose_DateStatusTotal Revenue
A12/31/2020Closed$12,000
B12/4/2020Closed$18,000
C11/26/2020Closed$150,000
D1/1/2021Open

$4,200

E12/4/2020Closed$3,666
F2/2/2021Open$15,000
G3/5/2021Open$20,600

 

In this case, it would be $183, 666

Thank you for your help!

 
3 REPLIES 3
Anonymous
Not applicable

Try the following measure 

Measure = SUMX(FILTER('Table','Table'[Status]="Closed"),'Table'[Total Revenue])

Ensure you replace "Table" with your table name. 

@Anonymous this was not a solution. The orig request is adding a date filter in as well. was that an oversight in trying to help or were you just adding what you know for part of it?

Thank you, but the part that is missing is adding to that a relative date filter (close date in the last 2 months), how do I add that part into what you have provided? 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.