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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
beginner
Helper I
Helper I

How to refer the same period for 3 consecutive days starting from last working day of current month

I am trying to run below date filter every month starting from last working day of the current month to filter last 12 calendar months. So let's say we start today it will show 3/1/2022-2/28/2023. It runs for 3 days but it always need to show 3/1/2022-2/28/2023. I do this for 3 times. March 1st, March 2nd, and March 3rd still need to show 3/1/2022-2/28/2023. Next month same process with last calendar 12 months. I can't find why my measure is not working. 

 

Saledate is_current year =
var last12_month=EOMONTH(TODAY(),-12)
var last12_month_startdate=DATE(YEAR(last_12_month),MONTH(last_12_month),1)
var lastmonth=DATE(YEAR(TODAY()),MONTH(TODAY()),1)
return
IF('Table'[Saledate]>=last_12_month_startdate&&'Table'[Saledate]<=last_month,1,0)

2 REPLIES 2
lbendlin
Super User
Super User

 I do this for 3 times. March 1st, March 2nd, and March 3rd still need to show 3/1/2022-2/28/2023.

What should happen for March 4th?

Continue to apply the filter until next last working day of the month which will be 03/31/2023

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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