Forum Discussion
Anonymous
4 years agoNot applicable
DAX help for a Restricted Measure
Dear Experts I have the YearWeek, Sales and some more fields coming from 4 different tables. I want to display in a new column the last 6 weeks sales figure based on System Week. Thi...
- 4 years ago
Hi Anonymous
Please tryLast 6 Weeks Sales = VAR CurrentYearWeek = SELECTEDVALUE ( TableName[YearWeek] ) VAR TodayYearWeek = YEAR ( TODAY () ) * 100 + WEEKNUM ( TODAY () ) VAR StartYearWeek = TodayYearWeek - 6 RETURN IF ( CurrentYearWeek <= TodayYearWeek && CurrentYearWeek > StartYearWeek, [Sales Amount] )
davehus
Memorable Member
4 years agoHi Anonymous , Do you have a sanitised version of your report you could share? You could achieve this with DATESINPERIOD and a workaround as DIP only uses, days, months or years in the formula.