Forum Discussion
Date Groupings - 4 Week Increments
- 5 years ago
Hi ryan_b_fiting ,
First go to query editor >create an index column;
Then create 2 columns as below:
rankx = RANKX(FILTER('Table',MOD('Table'[Index],4)=0),'Table'[Index],,ASC)4 Wk Ended = var _mindate=CALCULATE(MIN('Table'[Time]),FILTER('Table','Table'[rankx]=EARLIER('Table'[rankx]))) Return _mindate+21And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
ryan_b_fiting , You can create a date table, and there you can create week start and week end is +28 days.
and create a bucket based on that.
example , new columns in date table
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = [Week Start date] +4
Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])
of you can get on the week start date and create 4-week period post that
Min Week Start date = min([Week Start date])
4 Week No = Quotient(datediff([Min Week Start date],date,day),28)+1