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

3 Mth and 12 mth average the same

My first attempt at moving averages.  My problem is whether I have "-3", or "-12" its the same number.  All fields are coming from the same table. Also wondering if part of the problem is there are multiple "CostNet" entries for each "ReceivedDate".

 

An example of the RTP table:

Received Date    CostNet

1/1/2017             100

1/1/2017              50

1/3/2017              50

2/2/2017              75

2/2/2017              100

2/10/2017            50

....and so on

 

 

The measure:

 

MovingAverage3Months_CostNet =

CALCULATE (

    sumx(RTP,RTP[CostNet]),

    DATESINPERIOD (

        RTP[ReceivedDate],

        LASTDATE ( RTP[ReceivedDate] ),

        -12,

        MONTH

    )

)

 

 

 

1 ACCEPTED SOLUTION
waltheed
Impactful Individual
Impactful Individual

Hi, 

 

Do you have a separate date dimension table? That would be the first thing to do. Mark this as data table, and you can use time intelligence functions. Link your cist table to the date table. 

 

More info, check this post.

 

 

Cheers, Edgar Walther
ITsmart BI and Analytics consultant

View solution in original post

3 REPLIES 3
waltheed
Impactful Individual
Impactful Individual

Hi, 

 

Do you have a separate date dimension table? That would be the first thing to do. Mark this as data table, and you can use time intelligence functions. Link your cist table to the date table. 

 

More info, check this post.

 

 

Cheers, Edgar Walther
ITsmart BI and Analytics consultant
Anonymous
Not applicable

Thanks!

waltheed
Impactful Individual
Impactful Individual

You're welcome. Glad it worked for you. 

Cheers, Edgar Walther
ITsmart BI and Analytics consultant

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.