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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
vdlbrtt
Frequent Visitor

Employee production by team production

Hi guys, im trying to get this results in powerbi, i need to get employee performance like this 

 

vdlbrtt_1-1698523245137.png

it dont matter if is in a table or in a matrix, i just need to detail the employee production by day and the average of their team in the same day, in the end i need to show the totals as average by employee and by the team

so the performance will be the employee production divide by team production 

these are the table i have

Production Table

DATE

 

 

NAMETEAMPRODUCTION
3-maiEmployee 1Team 11
3-maiEmployee 2Team 25
3-maiEmployee 3Team 25
3-maiEmployee 4Team 12
3-maiEmployee 5Team 33
3-maiEmployee 6Team 31
2-maiEmployee 1Team 12
2-maiEmployee 2Team 25
2-maiEmployee 3Team 25
2-maiEmployee 4Team 15
2-maiEmployee 5Team 34
2-maiEmployee 6Team 33

 

Calendar Table

 

MONTHMONTH NUMBERWEEK
3-mai54
4-mai55
5-mai56
6-mai57
7-mai51
8-mai52
9-mai53
10-mai54
11-mai55
12-mai56
13-mai57
14-mai51

 

Employee name table

 

NAMEID
Employee 1157
Employee 2639
Employee 3918
Employee 4898
Employee 5802
Employee 6167
Employee 7259
Employee 8830
Employee 9977
Employee 10447
Employee 11660

 

2 REPLIES 2
lbendlin
Super User
Super User

Your production table only covers two days and your Employee Name table can be omitted. Please provide more production sample data.

Hi, thank you for the attention, i tried some things but nothing works, here are some statements i need to consider

  • Performance is: Employee Production divided by Queue Average Production, so it will give me the percentage if employee is 90% 110%.... above ou below the others

  • Some employees can be in multiple teams, but they compete just with the employees in the same queue

  • For Individual Production and Queue Average Production must not consider the days the selected employee were absent

I got this measure for the employee production, but it

  • Dont work with employees that are in two tables, Team1Production and Team2Production, it needs to sum all their production

  • Cant get the average of the employees in the same queue, it always takes the average of ALL queues and it needs to not consider the absent

Here is the link wetransfer link 

 

Individual Production = 
VAR _Employee = SELECTEDVALUE('factEmployees'[Names])

VAR DatesToExclude =
    FILTER(
        SUMMARIZE(
            FILTER('Absence', 'Absence'[Name] = _Employee),
            'Absence'[Date]
        ),
        'Absence'[Date] <> BLANK()
    )

VAR AvgTeam1 =
    AVERAGEX(
        KEEPFILTERS(VALUES('factCalendar'[Date])),
        CALCULATE(
            AVERAGE(Team1Production[Production]),
            FILTER(
                'factCalendar',
                NOT('factCalendar'[Date] IN DatesToExclude)
            )
        )
    )

    VAR AvgTeam2 =
    AVERAGEX(
        KEEPFILTERS(VALUES('factCalendar'[Date])),
        CALCULATE(
            AVERAGE(Team2Production[Production]),
            FILTER(
                'factCalendar',
                NOT('factCalendar'[Date] IN DatesToExclude)
            )
        )
    )

RETURN
AvgTeam1+AvgTeam2

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.