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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MillarJayakumar
Frequent Visitor

12 month Rolling Average

can any one suggest me the correct dax code for 12 month rolling average ( i try to do it but its showing incorrect result)

 

My code :-
12 Month Rolling Average = CALCULATE(AVERAGEX('DMADP OPEM_ADP_DATE_D',[Total TRs]), DATESINPERIOD('DMADP OPEM_ADP_DATE_D'[Date], MAX('DMADP OPEM_ADP_DATE_D'[Date]), -12, MONTH))
 
Just for your info
meaning of Year-Month (date type date) - Column which is newly created in PBI ( like add column)
meaning of Total TRs( data type text) - Dax query ( count(TRid))
 
MillarJayakumar_0-1704874304428.png

 

1 REPLY 1
collinsg
Super User
Super User

Good day MillarJayakumar,

Alberto Ferrari of sqlbi.com provides a guide to creating a twelve month rolling average in DAX. It is here. In general DAX gurus will hang out in the Dax Commands and Tips forum, it's probably the better forum for getting fast responses on DAX queries.

Hope this helps

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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