Forum Discussion
Anonymous
3 years agoNot applicable
Rolling Average Using Index (NOT DATE)
Dear all, I would like to ask , "What are examples of workable coding that I can try using if I need to perform rolling average of 30 weeks using the INDEX row and NOT Dates?" because based on my re...
- 3 years ago
Anonymous So like:
Better RA = VAR __Index = MAX('Table'[Index]) VAR __MinIndex = __Index - 30 VAR __Table = FILTER(ALLSELECTED('Table'),[Index] < __Index && [Index] >= __MinIndex) RETURN AVERAGEX(__Table,[Value])Note, I pretty much just replaced [Date] with [Index]...
Greg_Deckler
Community Champion
3 years agoAnonymous So like:
Better RA =
VAR __Index = MAX('Table'[Index])
VAR __MinIndex = __Index - 30
VAR __Table = FILTER(ALLSELECTED('Table'),[Index] < __Index && [Index] >= __MinIndex)
RETURN
AVERAGEX(__Table,[Value])
Note, I pretty much just replaced [Date] with [Index]...
Anonymous
3 years agoNot applicable
Dear Mr Greg_Deckler,
Thank you so much for your suggested solution and I will give it a try.
- Kai Li