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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
YesP
Helper I
Helper I

Create a measure Current while filtering various month (YDT)

Hi,

I have a visualization with YTD and Same Period Last Year. I want to create a measure to get the Actuals of the last Month of the YTD. For instance: I have Data from January to Decmber 13. My filters are from January to November 2024 and my YTD (Jan-Nov) amount is $200,000 and SPLY is 180,000. I want a Current measure to show me total Sales of November. And if I change my filter from January to October I want as Current to show me total Sales of October. 

I created the following Dax but it does not works.

Last 30 days = CALCULATE([Current], DATESINPERIOD('Calendar'[Date],MAX('Calendar'[Date]),-30, DAY))

 

YesP_0-1734126584353.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Measure = calculate([Current],datesbetween(Calendar[date],eomonth(max(calendar[date]),-1)+1,max(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Measure = calculate([Current],datesbetween(Calendar[date],eomonth(max(calendar[date]),-1)+1,max(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur this works great. Thank you!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.