Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Running average between two dates

Hi,

 

I have copied an issue below. Please help me in solving this as soon as possible.

I have below data.

dateHCREV
1-Dec-18589 
1-Jan-196169500
1-Feb-196305698
1-Mar-196487459
1-Apr-196483521

 

I want to show in below format by using above table. Running HC AVG value is running average from minimum date to current date and Running REV SUM value is sum from minimum date to current date.

dateHCREVRunning HC AVGRunning REV SUMRunning rev sum/running HC AVG
1-Dec-18589    
1-Jan-196169500602950015.7807309
1-Feb-1963056986111519824.87397709
1-Mar-1964874596202265736.54354839
1-Apr-1964835216262617841.81789137

 

ANd I want to show running rev sum/running HC avg  value in column chart for 2019 year from jan to april in x-axis.

 

Thanks

Praneeth

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Create three calculate columns using DAX below:

Running HC AVG = IF('Table'[date] <> MIN('Table'[date]), CALCULATE(ROUNDDOWN(AVERAGE('Table'[HC]), 0), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date]))))

Running REV SUM = CALCULATE(SUM('Table'[REV]), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date])))

Running rev sum/running HC AVG = 'Table'[Running REV SUM] / 'Table'[Running HC AVG]

Capture.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Create three calculate columns using DAX below:

Running HC AVG = IF('Table'[date] <> MIN('Table'[date]), CALCULATE(ROUNDDOWN(AVERAGE('Table'[HC]), 0), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date]))))

Running REV SUM = CALCULATE(SUM('Table'[REV]), FILTER('Table', 'Table'[date] <= EARLIER('Table'[date])))

Running rev sum/running HC AVG = 'Table'[Running REV SUM] / 'Table'[Running HC AVG]

Capture.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.