Skip to Content
0

Last 4 Week formula

Jan 16 at 11:00 AM

24

avatar image
Former Member

Hi, I need to write a formula to fetch last 4 week data in webi report.I have Dim_Week_no which has whole year data.from 201701 to 201852 I have created a variable for Last4Week: =Substr([Dim_Week_no];1;4)+""+Week(RelativeDate(CurrentDate();-28)), my completed week is 201802, so for last4 week i need data from 201751-201802. Last 4week isn't working for me =Substr([Dim_Week_no];1;4)+""+Week(RelativeDate(CurrentDate();-28)) giving me 201751 and 201851 please let me know the solution

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Erdem Pekcan Jan 16 at 12:00 PM
0

Hi,

If you're on 4.1 SP6 or higher, try this:

=RelativeDate(CurrentDate(); 4; WeekPeriod)

Share
10 |10000 characters needed characters left characters exceeded