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
HALEYSTODDARD
Frequent Visitor

SAME WEEK/DAY NAME for last year vs. this year

Hi all! I'm trying to come up with a measure that would sum the hours worked on this day last year and compare it to this year. It needs to be a day of week comparison because our hours worked vary based on day of week volume fluctuations. For example, Monday's are higher that Friday's. 
 
Initially I tried
 
 
Total LY = CALCULATE(SUM('Kronos Detail'[Hours]),SAMEPERIODLASTYEAR(Dates[DATE]))
 
but I can't do it on the specific date, since this day last year was 3/23/22 vs. 3/22/23. I need it to be where week #/day name for 2022 = week/day name for 2023.
 
Does anyone have any tips/tricks on achieving this?
1 ACCEPTED SOLUTION
HALEYSTODDARD
Frequent Visitor

I ended up solving this myself with two measures. 

 

1st  = CALCULATE(SUM('Kronos Detail'[Hours]),DATEADD(Dates[DATE],-1,YEAR))
2nd = CALCULATE([1st],DATEADD(Dates[DATE],+1,DAY))

View solution in original post

1 REPLY 1
HALEYSTODDARD
Frequent Visitor

I ended up solving this myself with two measures. 

 

1st  = CALCULATE(SUM('Kronos Detail'[Hours]),DATEADD(Dates[DATE],-1,YEAR))
2nd = CALCULATE([1st],DATEADD(Dates[DATE],+1,DAY))

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.