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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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