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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
JoseLuisC
Frequent Visitor

AYUDA .. MEDIDA DAX PROMEDIO

Hola , su ayuda por favor , no me muestra el promedio de los importes de los 12 meses . 

Que falta en mi medida DAX . 

 

CapturaRRRRRRRRRRRRRRRRRRR.JPG

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @JoseLuisC 

 

You can try the following methods.

12 month average = 
Var _N1=SUMMARIZE(FILTER('Table',[PERIODO]<=MAX('Table'[PERIODO])),'Table'[PERIODO],"Sum",[Measure])
Var _N2=TOPN(12,_N1,[PERIODO],DESC)
Var _Average=DIVIDE(SUMX(_N2,[Sum]),12)
return
_Average

vzhangti_0-1681970391502.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @JoseLuisC 

 

You can try the following methods.

12 month average = 
Var _N1=SUMMARIZE(FILTER('Table',[PERIODO]<=MAX('Table'[PERIODO])),'Table'[PERIODO],"Sum",[Measure])
Var _N2=TOPN(12,_N1,[PERIODO],DESC)
Var _Average=DIVIDE(SUMX(_N2,[Sum]),12)
return
_Average

vzhangti_0-1681970391502.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

 

lbendlin
Super User
Super User

please show the formula for the Existencias measure.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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