Forum Discussion

SUTTY's avatar
SUTTY
Frequent Visitor
4 years ago
Solved

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: Name Session Duration Distance A ...
  • v-henryk-mstf's avatar
    4 years ago

    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] )
            )
        )
    )


    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.