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
AdityaPowerBI
Helper II
Helper II

Last friday(last working day) of last year in DAX

Hi All,

 

I am stuck on a seemingly simple problem. I have current year values and I need to compare them with last year values. Last year value should be the last working day or last friday of the last year. E.g current year is 2021 then last year last working day is 31st December 2020. But if last year was 2017 then it should fetch 29th December 2017. Is there any dax function which can help? I only need the date value so that I can use it in my measures.

 

TIA

1 ACCEPTED SOLUTION
AdityaPowerBI
Helper II
Helper II

@amitchandakSorry this didnt work. I followed the following blog from @Greg_Deckler 

https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545

It helped. I had to modify the dax a bit for my scenario and it worked.

View solution in original post

2 REPLIES 2
AdityaPowerBI
Helper II
Helper II

@amitchandakSorry this didnt work. I followed the following blog from @Greg_Deckler 

https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545

It helped. I had to modify the dax a bit for my scenario and it worked.

amitchandak
Super User
Super User

@AdityaPowerBI , You can create a week year behind measure with help with a date table marked as a date table

 

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAY))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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! Prices go up Feb. 11th.

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.