Forum Discussion
PeraZo
Helper I
5 years agoHow to create new column that get value from previous row (previous date)
Hi, Can someone kindly help me adding new column ("Sales Previous Day ") that gets value from previous row (or previpus day, week, year)? The table data is below. I want to get sales number ...
PeraZo
Helper I
5 years agoHi,
Thank you!!
It worked.
I customized your code like below for previous week, month etc. and it's working.
Previous Week Sales =
CALCULATE(
SUM(Table2[Sales]),
LASTDATE(
FILTER(
ALL(Table2[Date] ),
Table2[Date] < EARLIER([Date]) -6
)
),
ALLEXCEPT(Table2,Table2[Store ID])
)
Thank you.
Cheers.