Forum Discussion
nasbkrv
5 years agoRegular Visitor
Last week formula
Hi, I have a report page with slicers for Year, Week from-To, Last week. But I have an issue with my Last Week formula and the interaction with the Year filter. Last week formula is: IF (Y...
- 5 years ago
Hi nasbkrv ,
Please create Year_Week column as filter condition first.
Year_week = 'Table'[week]+'Table'[year]*100Then create Last week column:
IsLastWeek2 = var current_date = CALCULATE( MIN('Table'[Date]), FILTER('Table', 'Table'[Year_week]=MAX('Table'[Year_week])) ) return IF('Table'[Date]<current_date&& 'Table'[Date]>=current_date-7, "Yes", "No")Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ray_Minds
2 years agoSolution Supplier
Calculate last week data
Did I answer your question? Mark my post as a solution! This will help others on the forum!