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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Greg0ry
Helper II
Helper II

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

Greg0ry
Helper II
Helper II

It's OK! Thank you!!

View solution in original post

3 REPLIES 3
Greg0ry
Helper II
Helper II

It's OK! Thank you!!

Greg0ry
Helper II
Helper II

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
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.

Top Solution Authors