Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
How to get Last week sales for previous year ?
@amitchandak @Sahir_Maharaj @Greg_Deckler @FreemanZ @Ashish_Mathur @olgad @tamerj1 @andhiii079845
Again, please a full example. This is completely unclear what your problem is.
Proud to be a Super User!
Please a example with some underlaying data and what do you want. Please read the pinned post how to ask for help.
Proud to be a Super User!
@saurabhtd This works well if you have disconnected date dimension table
Measure =
VAR _selectedDate = Today() //SELECTEDVALUE(dimDate[Date])
VAR _startDate = (_selectedDate-(WEEKDAY(_selectedDate,2)-1))-7
VAR _pystartDate = DATE(YEAR(_startDate)-1,MONTH(_startDate),DAY(_startDate))
VAR _endDate = _startDate+6
VAR _pyendDate = DATE(YEAR(_endDate)-1,MONTH(_endDate),DAY(_endDate))
RETURN CALCULATE(SUM(Table[Sales]),Table[Date] >= _pystartDate && Table[Date] <= _pyendDate)
I have connected calendar table. So this doesn't work.