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 August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.