Forum Discussion
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.
- Anonymous2 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 TeamIf 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
4 Replies
- lbendlin
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-Forum/ba-p/963216
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/1447523 - AnonymousNot 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.
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 TeamIf 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
- MartaBakRegular Visitor
Sorry for not responding.
Below more data :
Table[Data]
employee DATE id EMAIL X 20.02.2024 123456 Y 20.02.2024 123456 Z 20.02.2024 123456 Z 20.02.2024 123456 Z 20.02.2024 123456 Z 20.02.2024 123457 Z 20.02.2024 123458 Z 20.02.2024 123459 X 20.02.2024 123459 X 20.02.2024 123459 Y 20.02.2024 123459 X 20.02.2024 112345 X 20.02.2024 112549 Y 20.02.2024 123584 Z 20.02.2024 123695 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%
EMPLOYEE lp % X 5 100% Y 3 60% Z 7 140% AVEREGE 5 100% I don't know why my previos answer befor 4h doesn't showed 😞
- lbendlin
Super User
This thread has already been marked as solved. It would be better to open a new one.