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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Getting an average in a table's total

Hello, I created a dax formula to find out the previous month's data:

Detention tx detention M-1 = CALCULATE(SUM(Detention[TX_DETENTION_JOUR]), PREVIOUSMONTH('4 - Date'[Date]))

 

These data are percentages. But in the total row of my table, I have a percentage sum and not an average. Can you help me? THANKS.

Greg0ry_0-1739797606176.png

 

2 ACCEPTED SOLUTIONS
freginier
Super User
Super User

Hey! 

 

I think if you create a weighted average it should work, try using this formula instead: Detention_Tx_Avg = AVERAGEX( Detention, Detention[TX_DETENTION_JOUR] )

This formula will make sure it is not a sum of all averages. 

 

Hope this helps!

Zoe 😁😁

View solution in original post

Anonymous
Not applicable

It's OK! Thank you!!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

It's OK! Thank you!!

Anonymous
Not applicable

Thank you!!!

freginier
Super User
Super User

Hey! 

 

I think if you create a weighted average it should work, try using this formula instead: Detention_Tx_Avg = AVERAGEX( Detention, Detention[TX_DETENTION_JOUR] )

This formula will make sure it is not a sum of all averages. 

 

Hope this helps!

Zoe 😁😁

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors