Same Period Last Year for Fiscal WK Number & Day

Dear all,
In reference to the link of the original post below, would there be a way to branch this measure out to support WK number & Day of Last year?

Link to Original Post:

From the original measure of PY Sales Setup, I tried to add ‘Date’[DayInWeek] as a new variable but the outcome was not what I wanted. Below screenshot for reference.

Modified Measure

Modified Outcome
Capture

Advance thanks for the help all!

Regards
Hidayat

Have you had a look through these example below for ideas

Sam

Hi @sam.mckay,

Yea, had a look at the videos.
Turns out, all it took was a moment to sit down and a good cup of coffee.

Here is my solution for Year & ISOWeek & Day Comparison:

  1. Create a calculated column for Year & Week & Day in Date Table.

Year & Week & Day = ‘Date’[Year] &"-"&‘Date’[Week No.] &"-"&‘Date’[DayInWeek]

  1. After which, create a calculated column to sort “Year & Week & Day” as such:

YearWeekDaySort = ( ‘Date’[Year] * 10000 ) + (‘Date’[Week No.] * 100) + ‘Date’[DayInWeek]

  1. Next, proceed to create a measure:

PY Setup Pairs Sold =
VAR CurrentDay = SELECTEDVALUE ( ‘Date’[DayInWeek] )
VAR CurrentWeek = SELECTEDVALUE ( ‘Date’[Week No.] )
VAR CurrentYear = SELECTEDVALUE ( ‘Date’[Year] )
RETURN
CALCULATE( [PAA Sold], FILTER( ALL(‘Date’), ‘Date’[DayInWeek] = CurrentDay && ‘Date’[Week No.] = CurrentWeek && ‘Date’[Year] = CurrentYear - 1 ) )

  1. Last, use this measure to get the subtotal in the PY measurement.

PY Pairs Sold =
SUMX(
SUMMARIZE( ‘Date’, ‘Date’[Year & Week], ‘Date’[Week No.],‘Date’[DayInWeek],
“LY Sales”, [PY Setup Pairs Sold] ),
[LY Sales] )

Capture