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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
rachaelwalker
Resolver III
Resolver III

How to sum a value and exclude anything that is over 1 month old

How do I create a measure that sums the total of expected revenue but excludes anything over 2 months old. I only want to include the previous month and any dates moving forward. Example outlined in red below. 

I have a calendar table in my data model. 

rachaelwalker_0-1710191355888.png

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi, @rachaelwalker 

You can try the following DAX:

Expected Revenue Last Month Forward = 
CALCULATE(
    SUM('Table'[Expected]),
    FILTER(
        ALL('Calendar'),
        'Calendar'[Date] >= EOMONTH(TODAY(), -2) + 1 &&
        'Calendar'[Date] <= EOMONTH(TODAY(), 0)
    )
)

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous This is returning a repeating number that is showing an incorrect total.

rachaelwalker_0-1710256546063.png

Here is a pbix file with sample data. The file includes the expected results I am looking for https://drive.google.com/file/d/1T_U0XFpcMWJ3Jfv3sgNZQ2YJKyjgv5bS/view?usp=sharing 

Walter_W2022
Resolver II
Resolver II

@rachaelwalker , try this measure, 'DATE'[DATE] is assumed from you Date table

CALCULATE(
SUM(REVENUE COLUMN),
'DATE'[DATE]>=DATEADD(TODAY(), -2, MONTH)
)

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.