Forum Discussion
Rolling/Moving Average - Sports form guide
- 6 years ago
Hi michaeldonnelly ,
try this.
Rolling AVG Points last 6 matches = CALCULATE ( AVERAGE ( 'Table'[Points] ), TOPN ( 6, FILTER ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] <= MAX ( 'Table'[Date] ) ), 'Table'[Date], DESC ) )Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Hi michaeldonnelly ,
try this.
Rolling AVG Points last 6 matches =
CALCULATE (
AVERAGE ( 'Table'[Points] );
TOPN (
6;
FILTER ( ALL ( 'Table'[Date] ); 'Table'[Date] <= MAX ( 'Table'[Date] ) );
'Table'[Date]; DESC
)
)
You may download my PBIX file from here.
Hope this helps.
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
On your file it seems to work perfectly, when I have copied the measure as the table names are all the same, I am getting a different result, which is baffling, I have attached my file
- mwegener6 years ago
Most Valuable Professional
Hi michaeldonnelly ,
I don't have access to your link.
Please check the authorization.
It should be "Anyone with this link".- michaeldonnelly6 years agoFrequent Visitor
Doesnt seem to want to allow me the option to share without and email from my one drive, so uploaded to dropbox, link below
- mwegener6 years ago
Most Valuable Professional
Hi michaeldonnelly ,
try this.
Rolling AVG Points last 6 matches = CALCULATE ( AVERAGE ( 'Table'[Points] ), TOPN ( 6, FILTER ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] <= MAX ( 'Table'[Date] ) ), 'Table'[Date], DESC ) )Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.