Forum Discussion
dkay84_PowerBI
Microsoft Employee
9 years agoDAX help
I am trying to calculate sales YTD (using week number) vs. sales Last Year YTD. I can't use SAMEPERIODLASTYEAR because I have a custom FY calendar. My data will only ever have the current FY (YTD) ...
- 9 years ago
hi, With this modifcation should be work.
Last YTD Sales = VAR LY = [Last Year] VAR LW = [Latest Week YTD] RETURN CALCULATE ( SUM ( Table1[Sales] ), FILTER ( ALL ( Table1 ), Table1[FY] = LY && Table1[Week Number] <= LW ) )
v-huizhn-msft
Microsoft Employee
9 years agoHi dkay84_PowerBI,
You should create the measure using the formula dkay84_PowerBI posted. Please feel free to ask if you have other issue.
Best Regards,
Angelia