Forum Discussion
L1102
Helper I
8 months agoCalculating Latest Weeks & Comparing to Same Timeframe PY
Hi All, Looking for advice, I'm trying create a filter that has lastest week options for the end user on my dashboard ie. (YTD, L4,L12,L52). I have the following dax code to call the lastest time...
L1102
Helper I
8 months agod_m_LNK , I hard code the year because my fiscal calendar starts in May and is currently fiscal year 2026, however when I import my data from it's source it has the proper calendar date. For example, my fiscal year has a date range of May 2025 - May 2026. When I calculate YOY changes I needed it to identify what year is current and what was prior year because there is a combination of both 2025 & 2026 in one fiscal year.
I've only been doing dax and power bi since september so i'm still very green. If you know a better way to evaluate my years I'm open to all suggestions.
L1102
Helper I
8 months agoActually I found a way not to hard code the year... thanks for the tip!!
$ Sales CY =
VAR Current_Year = MAX(Promo Calendar'[Year])
RETURN
CALCULATE(sum(Data_Dump_Sheet[$ Sales]), Promo Calendar'[Year] = Current_Year)