Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.


90 moving total | average based on indx number

Hi Experts


i am trying to work out the 90 day moving / rolling average based on the index number that corresponds to a date in my FCt table. the values are correct for the first 90 days - come day 91 the value all go wrong. cannot see the wood for the trees.


90 days running total sales = 
VAR MaxIndex = MAX( 'BioSales'[Index]) -- Ending period
VAR MinIndex = MaxIndex - 90             -- Starting period
VAR Result = 
          [Correlation Coefficient],
          -- return dates between starting and ending period
          FILTER( ALL( 'BioSales' ),  
                  'BioSales'[Index] <= MaxIndex &&  
                  'BioSales'[Index] >  MinIndex )
Super User
Super User

@parminderkellah Better Rolling Average - Microsoft Power BI Community

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors