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
MartaBak
Regular Visitor

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.

For example, we have 5,900 emails and 7 employees. 

Employee 1 make 230 emails.

Employee 2 made 1,000

emails average = 5900/7 = 843

Employee 1 = 230/843 = 27%

Employee 2 = 1000/843 = 119%

I have a basic formula that counts the email id [ E-MAILS =COUNTROWS('N MCT')] and the number of employees [LP.EMPLY =DISTINCTCOUNT('N MCT'[Agent Name])] then [ AVER = [E-MAILS/LP. EMPLY] and this solution works like I'm creating a matrix - but when I want to present the result in a card, it simply shows me the number of e-mails for this employee.

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

vyaningymsft_0-1703059346301.png

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

View solution in original post

4 REPLIES 4
MartaBak
Regular Visitor

Sorry for not responding.

Below more data : 

 

Table[Data]

employeeDATEid EMAIL 
X20.02.2024123456
Y20.02.2024123456
Z20.02.2024123456
Z20.02.2024123456
Z20.02.2024123456
Z20.02.2024123457
Z20.02.2024123458
Z20.02.2024123459
X20.02.2024123459
X20.02.2024123459
Y20.02.2024123459
X20.02.2024112345
X20.02.2024112549
Y20.02.2024123584
Z20.02.2024123695

 

What I need :

1. Sum of all e-mail per employee [lp]

2. percentage of employee participation compared to the average, which we assume as 100% [%]

3. employee name [EMPLOYEE]

 

example : 

sum of e-mail = 15

amount of employess =3 (X,Y,Z)

ave. email = 15/3=5

employee participation X =5/5 = 100% , Y= 3/5 = 60%, Z=7/5= 140%

 

 

EMPLOYEElp%
X5100%
Y360%
Z7140%
AVEREGE5100%

 

 

I don't know why my previos answer befor 4h doesn't showed 😞

This thread has already been marked as solved.  It would be better to open a new one.

Anonymous
Not applicable

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.

vyaningymsft_0-1703059346301.png

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

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.