Forum Discussion
Get one week prior text
Hi Experts!
I have a table with Date, Code and a calculated column as "Method". Now I need to add another column/measure with previous week's Method. That is a table like this (this is a very small sample):
| Date | Code | Method | Prev week Method |
| 27.09.2016 | 792ASC | 40-50 Days | 35-40 Days |
| 30.10.2016 | 589FVT | 35-40 Days | Successful |
| 20.09.2016 | 269CRE | 35-40 Days | 40-50 Days |
| 23.10.2016 | 279DEW | Successful | XXX |
If relevant, calculated column "Method" is based on another calculated column.
I tried several formulas, but nothing worked.
Column=CALCULATE(AVERAGE(Table[Method),FILTER(ALL(Table),Table[Date]=TODAY()-1)
Measure=CALCULATE(AVERAGE(Table[Method),FILTER(ALL(Table),Table[Date]=TODAY()-1)
hi Ch
try to add a column like:'
column = MAXX( FILTER( TableName, TableName[Date]=EARLIER(TableName[Date])-7 ), TableName[Method] )it worked like:
3 Replies
- FreemanZSuper User
hi Anonymous
can you fill out the last expected column directly? as your description is not sufficient.
- AnonymousNot applicable
I edited the table a little bit. As an example, In the first row of the table, date is 27.09.2016. So one week back is 7 days back. And then the date should be 20.09.2016. Then "Prev week Method" should be the "Method" of 20.09.2016. Which is 35-40 Days. Hope this helps. Thank you for your time.