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! Learn more

Reply
mengjiehe
New Member

How to calculate next Month last snapshot

mengjiehe_0-1689851882917.png

mengjiehe_2-1689852142544.png

 

I wrote a measure "Next Month End" to capture the value of last snapshot of next month for the selected snapshot but it didn't work.

For example, if I select 2/6/2023 or 2/19/2023, I want to see "Next Month End" measure can capture the value in snapshot 3/30/2023. But my DAX not work... actually nothing comes out. See last screenshot in the bottom.

Next Month End = CALCULATE(sum(Demand[Demand]),FILTER(ALL(Snapshot[Snapshot]),Snapshot[Snapshot]=endofmonth(NEXTMONTH(Demand[Snapshot]))))
 
mengjiehe_1-1689852002453.png

 

2 REPLIES 2
Legend_11
Resolver I
Resolver I

Next month dax =
VAR EndDate1 = EOMONTH(FIRSTDATE('Table'[Snapshot]),+1)

return CALCULATE(sum('Table'[Demand]),'Table'[Snapshot]=EndDate1)

 

Could you try above measure? I passed the date as variable and taken the next month last date and use it in filter

 

 

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

Hi Thanks, looks it didn't work in the database. I guess becasue the EOMONTH is returning calendar last day of each month but in my Snapshot the last one may not the exact last day of that month.

mengjiehe_0-1689898267739.png

 

Helpful resources

Announcements
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!

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.