Forum Discussion
Anonymous
4 years agoNot applicable
Filtering column by Future date
Hello all, I have a table coming from an SQL Query where one of the columns shows the date when a user registered and the next column shows how many purchases they made all time, something like this...
mh2587
4 years agoSuper User
NEXT 20 Days PURCHASE =
var currentDate = LASTDATE('Date Table'[Date])
var Next20Days = DATEADD(LASTDATE('Date Table'[Date]),20,DAY)
var TPURCHASE = CALCULATE(SUM(TABLE NAME[TOTAL PURCHASE]),DATESBETWEEN('Date Table'[Date],Next20Days,currentDate))
return TPURCHASE