cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KhanhTu
Frequent Visitor

Average of each month

Hello Power Bi community
I have this challenge to find average compensation per month, and the averaging of each month only based on the current year

Average Compensation = AVERAGEX(
                                              VALUES(DIM_DATE[MM-YYYY]),
                                                [Total Compensation])

 

 

(This is just a sum dax. [Total Compensation] = SUM(amount))
Example, for 2021: 
first 2 month has 1 average based of the first 2 month 
(867+991)/2 = 929
First 3 month:
(867+991+919)/3  = 925
etc.

KhanhTu_0-1623662205263.png

 

1 REPLY 1
SanketBhagwat
Super User
Super User

Hi @KhanhTu .

If your date column contains data in MM-YYYY format, then I would recommend you to first create a Month calculated column using =TEXT([Date Column],”MM”) and then use the below DAX,

Avg. Compensation=
                                   AVERAGEX(VALUES(DIM_DATE[MM-YYYY]),

                                  [Total Compensation])

 

Else you can convert the same column in MM format and perform the DAX.

 

Regards,

Sanket Bhagwat.

 

If this post helps, then please consider iit as Accept as the solution.

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors