Forum Discussion
LY Fiscal Calculation
- 9 months ago
Brendy_P , If you have Oct-2025 or onward
New Calendar
Do these entries
Formula
YTD FY = CALCULATE([Net], DATESYTD('FY'))
Hey Brendy_P ,
The issue is not with SAMEPERIODLASTYEAR it's that your fiscal calendar does not align with the true date shift that DAX performs. DAX always offsets by 365 days, not by your Company Week 1 --> Week 1 fiscal structure.
To get the correct result, you must shift fiscal periods, not dates.
The fix is to use a Fiscal Year + Fiscal Week mapping and manually jump to the pervious fiscal year while forcing Week = 1.
Measure (Fiscal LY Todal)
LY Total =
VAR CurrFY =
SELECTEDVALUE ( Calendar[FiscalYear] )
VAR PrevFY =
CurrFY - 1
RETURN
CALCULATE (
[Total], -- your base measure
Calendar[FiscalYear] = PrevFY,
Calendar[FiscalWeek] >= 1 -- ensures you start at Company Week 1
)
- It ignores the natural calendar date offset.
- It explicity tells Power BI : "Go to Fiscal Year (FY - 1) and start calculating from Week 1"
- This aligns perfectly with your compnay's 1/4-31/3 fiscal structure.
I ran into the exact same mismatch before DAX was technically "correct" but not fiscally correct. Shifting by fiscal attributes instead of dates is the key.
If it solved your issue, feel free to mark it as the solution so others can benefit too.
Thanks for being part of the community.
Hi MohdZaid_
Thank you for your reply.
I have tried the measure but I get an error. Because SELECTEDVALUE ( Calendar[FiscalYear] ) is formatted as a text value in my calendar table, you can't minus 1 from it. i.e. 25-26. I feel that you are close to the solution or maybe it is something that I am doing wrong. Or need to adjust on my calendar table.