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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Abhijith_KG
New Member

Moving Average

Hello Friends,

I am working on a dataset for my project and need to create a moving average. Below is the sample dataset that i am using. Can you suggest me the DAX command for the same.

CompanyDateClose
Caplin Labs01-04-2016215.89
Caplin Labs04-04-2016221.09
Caplin Labs05-04-2016215.26
Caplin Labs06-04-2016212.05
Caplin Labs07-04-2016213.60
Caplin Labs08-04-2016212.38
Caplin Labs11-04-2016211.19
Caplin Labs12-04-2016213.01
Caplin Labs13-04-2016212.19
Caplin Labs18-04-2016211.13
Caplin Labs20-04-2016207.77
Caplin Labs21-04-2016206.42
Caplin Labs22-04-2016203.23
Caplin Labs25-04-2016199.75
Caplin Labs26-04-2016199.56
Caplin Labs27-04-2016198.96
Caplin Labs28-04-2016195.75
Caplin Labs29-04-2016194.25
Caplin Labs02-05-2016196.55
2 REPLIES 2
amitchandak
Super User
Super User

@Abhijith_KG , based on what I got

 


New column = averageX(filter(Table, [Date] = earlier([Date])),[Close])

 

or


New measure = averageX(filter(allselected(Table), Table[Date] = max(Table[Date])),[Close])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Abhijith_KG
New Member

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.