Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

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   CodeMethod   Prev week Method
27.09.2016   792ASC40-50 Days  35-40 Days
30.10.2016   589FVT35-40 Days  Successful
20.09.2016   269CRE35-40 Days  40-50 Days
23.10.2016   279DEWSuccessful    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)

 

 

 

 

 

 Please help. Appreciate your help!
1 ACCEPTED SOLUTION

hi @Ch 

try to add a column like:'

column = 
MAXX(
    FILTER(
        TableName,
        TableName[Date]=EARLIER(TableName[Date])-7
    ),
    TableName[Method]
)

 

it worked like:

FreemanZ_0-1676549838757.png

 

View solution in original post

3 REPLIES 3
FreemanZ
Community Champion
Community Champion

hi @Anonymous 

can you fill out the last expected column directly? as your description is not sufficient. 

Anonymous
Not 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.

 

hi @Ch 

try to add a column like:'

column = 
MAXX(
    FILTER(
        TableName,
        TableName[Date]=EARLIER(TableName[Date])-7
    ),
    TableName[Method]
)

 

it worked like:

FreemanZ_0-1676549838757.png

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.