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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Paulo123
Frequent Visitor

avarage

Hi, I want to calculate the average of the years considering the value of each month, with each month being the result of a sum, how can i do this in PB

01/02/2018221
01/03/2018893
01/04/2018109
01/05/2018515
01/06/2018771
01/07/2018440
01/08/2018223
01/09/2018442
01/10/2018862
01/11/2018638
01/12/2018692
01/01/2019255
01/02/2019686
01/03/2019637
01/04/2019147
01/05/2019481
01/06/2019747
01/07/2019881
01/08/2019966
01/09/2019339
01/10/2019826
01/11/2019156
01/12/2019943
01/01/2020354
01/02/2020172
01/03/2020611
01/04/2020639
01/05/2020319
01/06/2020769
01/07/2020824
01/08/2020751
01/09/2020691
01/10/2020903
01/11/2020229
01/12/2020471
avarage560,0857143
1 ACCEPTED SOLUTION

Hi @Paulo123 
You need to iterate over the Year-Month column not the Month column. Something like

- Med =
AVERAGEX ( VALUES ( CALENDARIO[Year Month] ), [SOMA SAIDA] )

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@Paulo123 , Assuming you want some for month and average post that.

Have month year and year in this table of date tbale 

 

AverageX(values('Date'[Month Year]), calculate(Sum(Table[Value])) )

 

Sum till month level avg post that. Use year in visual


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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

hi,

thanks, I got the correct values ​​for each year, but if I just want an average considering all the months of the selected years, how do I do that?

Hi, @Paulo123 

 

In theory, the value of measure will change with the context. Can you show how you lay it out in the visual? What's the formula you used in the end?

 

Janey

Hi, first i make a sum:

 -SOMA SAIDA = CALCULATE(SUM(EX[VALOR]),E_S[Column1]="S")

second i calculate the average:

Med = AVERAGEX(VALUES(CALENDARIO[Date].[Mês]),[SOMA SAIDA]).

.

here we can see that the sum is working correctly:

Paulo123_2-1646388820589.png

changing the layout, i get the annual average correctly:

Paulo123_3-1646389015506.png

but i want to get an average considering all months of all selected years, as the result of this excel:

 

 

Paulo123_4-1646389205124.png

 

 

@Paulo123 

 

Have you tried @tamerj1's advice? If your problem has been solved, you can mark your answer as solution to close the thread. If not, please feel free to ask me.

 

Best Regards,
Community Support Team _ Janey

I don't know if I applied the solution correctly, but I created another column in the calendar with month and year and this column was used in the calculation.

Hi @Paulo123 
You need to iterate over the Year-Month column not the Month column. Something like

- Med =
AVERAGEX ( VALUES ( CALENDARIO[Year Month] ), [SOMA SAIDA] )

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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