cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
knightkblack Frequent Visitor
Frequent Visitor

Show Last 4 Weeks not include Current Week

I've got a formula calculating the last 4 weeks so I can have a rolling 4 week average. The only issue is that I don't necessarily want to include the current week. I would just want it to update at the end of each week if that makes sense.

 

This is the formula for my Last 4 Weeks column:

 

Last 4 Weeks = IF(AND(table[Date]>=table[Today]-28, table[Date]<=table[Today]),1,0)

 

I then use this as a page filter and only include the 1's.

 

As of right now, my graphs are showing Weeks 22 - 26 which is 5 weeks rather than just 4. We're currently in week 26 and I only want to see weeks 22, 23, 24 and 25 on my graph. Next week I would want to see weeks 23, 24, 25 and 26 on my graph.

 

Any help would be appreciated.

1 REPLY 1
rajendran Super Contributor
Super Contributor

Re: Show Last 4 Weeks not include Current Week

Will this help you ?

Last 4 weeks = IF(AND( WEEKNUM(Table1[Date])>= WEEKNUM(TODAY())-5 , WEEKNUM(Table1[Date])<= WEEKNUM(TODAY())-1),1,0)

 

 Then you can use the page filter to filter based on value 1.

 

Thanks

Raj

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors