Forum Discussion
yannick90
4 years agoFrequent Visitor
Auto select previous date
Hello guys, I'm coming up to you with an issue that has been frying my brain lately. Long story short, right now I'm comparing the data of two dates (this week vs previous week) hence on my calendar...
danextian
4 years agoSuper User
Hi yannick90 ,
Please try this
Value Last Week =
CALCULATE (
[Sum of Values],
FILTER ( ALL ( Dates ), Dates[Date] = MAX ( Dates[Date] ) - 7 )
)
If this doesn't work, please post a sample data and your dates table.
- yannick904 years agoFrequent Visitor
Hi danextian ,
this is what I typed:
CalcInvLastWeek RsmC = CALCULATE(SUM('table'[data)]),
FILTER(ALLSELECTED('table'),'table'[WeekRank]=MAX('table'[WeekRank])-7))This is what I get when I filtered May 22nd:I also tried the below but no luck:
CalcInvLastWeek RsmC = CALCULATE(SUM('table'[data)]),
FILTER(ALLSELECTED('table'),'table'[date]=MAX('table'[date])-7))thanks you