Power BI Retail Sales LY Same Day of Week Same Week Number

I have an interesting dilemma. In Power BI I would like to make comparisons to the same day of week same week number last year. In Power BI I have not found a way to create this. There is the function SAMEPERIODLASTYEAR() however, this is relative to the date so if the date is 1/1/2024 it will look at 1/1/2023. I need one instead that will look at our retail year. The structure of our Retail Year is such that the week starts on Sunday so if 12/31/2023 is on a Sunday it is part of week 1 of the year 2024. I have been messing with functions to help create this such as:

WeekNumber = 
VAR CurrentYear = YEAR('Calendar'[Date])
VAR CountWeek53 =
    CALCULATE(
        COUNTROWS('Calendar'),
        FILTER(
            'Calendar',
            YEAR('Calendar'[Date]) = CurrentYear &&
            WEEKNUM('Calendar'[Date], 1) = 53
        )
    )
VAR CountWeek54 =
    CALCULATE(
        COUNTROWS('Calendar'),
        FILTER(
            'Calendar',
            YEAR('Calendar'[Date]) = CurrentYear &&
            WEEKNUM('Calendar'[Date], 1) = 54
        )
    )
RETURN
IF(
    WEEKNUM('Calendar'[Date], 1) = 54 && CountWeek54 >= 7,
    54,
    IF(
        WEEKNUM('Calendar'[Date], 1) = 53 && CountWeek53 < 7,
        1,
        WEEKNUM('Calendar'[Date], 1)
    )
)

I formatted this code because every so often there can during a leap year be 54 weeks. I thus created a Week Number that will look at the date and if it is part of week number 53 or 54 it will look at how many days are in that week, if it is less than 7 it will add it to week 1 of the new year. I also created the retail year column this way:

Fiscal Year = IF(MONTH('Calendar'[Date]) == 12 && 'Calendar'[WeekNumber] == 1, INT(YEAR('Calendar'[Date]) + 1), INT(YEAR('Calendar'[Date])))

However, when it comes to actually building a working column or measure for the Sales, GM, or any other measure LY it does not work.

Due to the nature of retail some items available last year are not available this year and vice versa. Thus, you cannot make a column like so:

PreviousYearSalesMeasure = 
VAR CurrentDate = MAX('Calendar'[Date])
VAR CurrentYear = YEAR(CurrentDate)
VAR CurrentDayOfWeek = WEEKDAY(CurrentDate)
VAR CurrentWeekNumber = WEEKNUM(CurrentDate, 1)

-- Find the date from the previous year with the same week number and day of the week
VAR PreviousYearDate = 
    CALCULATE(
        MAX('Calendar'[Date]),
        FILTER(
            ALL('Calendar'),
            YEAR('Calendar'[Date]) = CurrentYear - 1 &&
            WEEKDAY('Calendar'[Date]) = CurrentDayOfWeek &&
            WEEKNUM('Calendar'[Date], 1) = CurrentWeekNumber
        )
    )

-- Fetch the sales value for the previous year date and specified group
VAR PreviousYearSalesValue = 
    CALCULATE(
        SUM('Sales'[Net Sales]),
        FILTER(
            ALL('Sales'),
            'Sales'[Date] = PreviousYearDate &&
            'Sales'[Store Number] = MAX('Sales'[Store Number]) &&
            'Sales'[Current Department Code] = MAX('Sales'[Current Department Code]) &&
            'Sales'[Current Class Code] = MAX('Sales'[Current Class Code]) &&
            'Sales'[Current Fineline Code] = MAX('Sales'[Current Fineline Code]) &&
            'Sales'[Current Vendor Code] = MAX('Sales'[Current Vendor Code])
        )
    )

RETURN
    IF(
        ISBLANK(PreviousYearDate),
        BLANK(),  -- Return BLANK if no corresponding date exists
        PreviousYearSalesValue
    )

In other words, I need a way to include sales that are attributed to discontinued items or items that are not sold the same day of week and week number without creating additional rows. I know this is a tall ask but, what would you recommend?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật