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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
sjade
Regular Visitor

DAX for selecting team and average based on individuals

I have a table with a similar setup as follows: 

NameTeamSkill AreaRating
johnDESQL3
johnDEETL2
laurenDEETL3
sarahDBASQL2
sarah DBASSRS2
sarahDBAPowerBI2
benBISQL3
benBISSRS2
georgeBISQL3
georgeBISSRS3

 

I am trying to write a DAX measure to calculate which team has the highest average and also how to calculate that average -- thanks in advance!

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @sjade 

I assume that the result will be displayed in a card visual and the skill can be selected using a slicer. Then you may try

Best Performing Teams =
CONCATENATEX (
    TOPN (
        1,
        ADDCOLUMNS (
            SUMMARIZE ( Table, Table[Team] ),
            "@Average", CALCULATE ( AVERAGE ( Table[AreaRating] ) )
        ),
        [@Average], DESC
    ),
    Table[Team],
    UNICHAR ( 10 )
)
Best Score =
MAXX (
    TOPN (
        1,
        ADDCOLUMNS (
            SUMMARIZE ( Table, Table[Team] ),
            "@Average", CALCULATE ( AVERAGE ( Table[AreaRating] ) )
        ),
        [@Average], DESC
    ),
    Table[Team]
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @sjade 

I assume that the result will be displayed in a card visual and the skill can be selected using a slicer. Then you may try

Best Performing Teams =
CONCATENATEX (
    TOPN (
        1,
        ADDCOLUMNS (
            SUMMARIZE ( Table, Table[Team] ),
            "@Average", CALCULATE ( AVERAGE ( Table[AreaRating] ) )
        ),
        [@Average], DESC
    ),
    Table[Team],
    UNICHAR ( 10 )
)
Best Score =
MAXX (
    TOPN (
        1,
        ADDCOLUMNS (
            SUMMARIZE ( Table, Table[Team] ),
            "@Average", CALCULATE ( AVERAGE ( Table[AreaRating] ) )
        ),
        [@Average], DESC
    ),
    Table[Team]
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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