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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Add an average column

I'm currently want to add a column which is the average of total amount over 12 months. As for the previous part, I tried to use what I've guided in Power BI's community to obtain the "New measure" of total sum, and I've put it under “Values". The formula for sum_ is

sum_ = sum('2023 RM Raw Data'[Amount])

Therefore, I wonder how to create an average? If I try to use average = sum('2023 RM Raw Data'[Amount])/12, I'll get 12 average followed by each month, which is weird and not the desired result. Thus, how to solve this issue?

Jiang_Yue_0-1729481991511.png

Jiang_Yue_1-1729482158330.png

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Has your problem been solved?

If so, accept the reply as a solution. This will make it easier for the future people to find the answer quickly.

If not, please provide a more detailed description, preferably some virtual sample data, and the expected results.

I noticed that your formula could be modified as:

calculate(sum('2023 RM Raw Data'[Amount]), filter(allselected('2023 RM Raw Data'),[groupfield]=max('2023 RM Raw Data'[groupfield]))/12

 

filter(allselected('2023 RM Raw Data'),[groupfield]=max('2023 RM Raw Data'[groupfield])

The above is to calculate the sum of a whole year in groups. You can modify this based on the fields in the rows in the matrix.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Best Regards,

Stephen Tao

 

Ritaf1983
Super User
Super User

Hi @Anonymous 

Please refer to the linked video:

https://www.youtube.com/watch?v=HEMARcoxhkI

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors