Forum Discussion

MartaBak's avatar
MartaBak
Regular Visitor
2 years ago
Solved

employee data compared to the team average.

I have two columns [Mail ID] and [employee] I need to get the average number of all e-mails [email id] and then show for each employee by what percentage it exceeds or does not exceed a given average...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, MartaBak

     

    May I ask if this is the expected output you are looking for? Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.

    Measures:

    E-MAILS =
    COUNTROWS('Table')
    
    LP.EMPLY =
    DISTINCTCOUNT('Table'[Employee])
    
    AvgEmail =
    'Table'[E-MAILS]/'Table'[LP.EMPLY]
    
    EmailNumbyEmployee1 =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            'Table',
            'Table'[Employee] = SELECTEDVALUE ( 'Employee_1'[Employees] )
        )
    )
    PercentEmail =
    [EmailNumbyEmployee1]/[AvgEmail]

    If this does not work, could you please share some sample data without sensitive information and expected output.
    How to provide sample data in the Power BI Forum - Microsoft Fabric Community

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum