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

View all the Fabric Data Days sessions on demand. View schedule

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.