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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SUTTY
Frequent Visitor

Average for different groups instead of total data

Hello,

Tried a few different things this afternoon but to no avail.

I'm taking data from a folder full of Excel files containing the following data:

NameSessionDurationDistance
AMatchday7810000
BMatchday9312000
CMatchday9313400
DMatchday9312200
EMatchday9311000
Atraining608000
Btraining608000
Ctraining608000
Dtraining608000
Etraining608000
AMatchday9312000
BMatchday9313000
CMatchday9311000
DMatchday719000
EMatchday9310000

 

I'm looking to present this data in a vizualisation that shows the Average Distance each person covered, when the session is a matchday and the duration was longer than 90. I'm currently using: Measure = Calculate(AVERAGE(Distance), [session]="Matchday"&&[duration]>90) which is giving the total average output in the table but the individual names are remaining blank. I can't figure out how to edit my formula in a way that shows each person's individualised average data in the table, which I then want to use to take each training distance as a % in a subsequent measure.

Any help would be much appreciated!

Many Thanks

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @SUTTY ,

 

According to your description, you need to add a grouping condition. Refer to the following test results:

Column = 
IF (
    'Table (2)'[Session] = "training",
    BLANK (),
    CALCULATE (
        AVERAGE ( 'Table (2)'[Distance] ),
        FILTER (
            ALL ( 'Table (2)' ),
            'Table (2)'[Session] = "Matchday"
                && 'Table (2)'[Duration] > 90
                && 'Table (2)'[Name] = EARLIER ( 'Table (2)'[Name] )
        )
    )
)

vhenrykmstf_0-1648706991239.png


If the problem is still not resolved, please provide detailed error information and a screenshot of the desired result. Looking forward to your reply.


Best Regards,
Henry


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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @SUTTY ,

 

According to your description, you need to add a grouping condition. Refer to the following test results:

Column = 
IF (
    'Table (2)'[Session] = "training",
    BLANK (),
    CALCULATE (
        AVERAGE ( 'Table (2)'[Distance] ),
        FILTER (
            ALL ( 'Table (2)' ),
            'Table (2)'[Session] = "Matchday"
                && 'Table (2)'[Duration] > 90
                && 'Table (2)'[Name] = EARLIER ( 'Table (2)'[Name] )
        )
    )
)

vhenrykmstf_0-1648706991239.png


If the problem is still not resolved, please provide detailed error information and a screenshot of the desired result. Looking forward to your reply.


Best Regards,
Henry


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

That's great thanks Henry!

I think my issue was I was trying to get it as a measure but completely forgot how easy using columns are!

MFelix
Super User
Super User

Hi @SUTTY ,

 

What is the final result you want to achieve? How do you want to use that result?

 

Can you please share some examples of the result you need?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors