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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Rolling 12 Month SUM

Thanks to all who reply,

 

I have a table showing material #, Revenue, Qty. I created a card to display the Rolling 12 mth Revenue total.

 

Net Sales rolling 12 mth =
CALCULATE(
SUM ( salesMaster[netRevenue] ),
DATESBETWEEN (
'Date Table'[Date],
NEXTDAY(SAMEPERIODLASTYEAR ( LASTDATE ('Date Table'[Date] ) ) ), LASTDATE('Date Table'[Date] )))

 

Date Table for years 2017- 2022.

BLD65_1-1651864589721.png

 

The problem is that I am only seeing the revenue total for this year (2022). I need to include the previous 8 months from 2021.

 

I want the Card to show the previous 12 months up to the current month. ( May 2021 - April 2022 ).   

 

Thank you!

BLD

 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Net Sales rolling 12 mth =
CALCULATE(
    SUM( salesMaster[netRevenue] ),
    DATESINPERIOD( 'Date Table'[Date], MAX( 'Date Table'[Date] ), -12, MONTH )
)

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Net Sales rolling 12 mth =
CALCULATE(
    SUM( salesMaster[netRevenue] ),
    DATESINPERIOD( 'Date Table'[Date], MAX( 'Date Table'[Date] ), -12, MONTH )
)

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Yes this works. Thanks!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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