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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate Minimum Average after column value

Hi all, 

I' am doing a sport analysis in which i need to calculate an average of best efforts in specific sports drills. 

 

So, I'm looking towards caluating a average of minimum time spend on a drill after player_name.

=

Player_nameTotal_timeMinimum_timeAvg ((10+30)/2)
X x101020
X x201020
X x301020

Y y

303020
Y y403020
Y y503020

 

 

Cheers, 


/M

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

Please try this expression in your measure in a table visual with Player_Name (and any other columns).

 

Avg Time =
AVERAGEX (
    ALL ( Times[Player_name] ),
    CALCULATE (
        MIN ( Times[Total_time] ),
        ALLEXCEPT (
            Times,
            Times[Player_name]
        )
    )
)

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
mahoneypat
Employee
Employee

Please try this expression in your measure in a table visual with Player_Name (and any other columns).

 

Avg Time =
AVERAGEX (
    ALL ( Times[Player_name] ),
    CALCULATE (
        MIN ( Times[Total_time] ),
        ALLEXCEPT (
            Times,
            Times[Player_name]
        )
    )
)

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Absolute legend @mahoneypat , thx!

 

//M

amitchandak
Super User
Super User

@Anonymous , Create a measure like

averageX(values(Table[Player_name]), calculate(Min(Table[Total_time])))

Anonymous
Not applicable

Hi,

Thanks for the effort! 🙂

 

That doesn't return a single AVG. The AVG varies row for row. It should be the same for the whole table as the AVG should be calculated for the whole table meaning AVG of minimum-time after player = Óne value for all rows, as they are subject to the same table avg.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors