Forum Discussion
ryan_b_fiting
Post Patron
5 years agoDate Groupings - 4 Week Increments
Hello Community - I have weekly data that has a report date for each week ending date. I want to create groupings so that I can have the values aggregated into 4 week buckets. I have provided a s...
- 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!
v-kelly-msft
Community Support
5 years agoHi 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+21
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!