cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TeunVerhagen11
Regular Visitor

Measure combining two tables on same column value

Hi all,

 

Im trying to calculate the efficiency % with the use of two tables.

 

The model looks like this:

 

TeunVerhagen11_0-1633432301178.png

 

So the data that is necessary to calculate the efficiency is connected to a fact table containing all employee data. The relationship uses the employee code. This relationship is necessary for other purposes withing the dataset so it cannot be changed.

 

The activity and logging table look as follows:

 

TeunVerhagen11_1-1633432435127.pngTeunVerhagen11_2-1633432447462.png

 

Table 1 contains all executed activities and a predetermined time in within the activity should be executed. (Standard time). Next to that, the activities are classified in working categories. (Category).

 

Table 2 contains the time logged by employees. They log time by selecting a working category.

 

So in order to calculate the efficiency I started with the formula: Standard Time Earned = SUM(Standard Time). The calculation for efficiency should be: Standard Time Earned / Time Logged (see example below).

 

TeunVerhagen11_3-1633432806227.png

 

The problem that I face is that no connection between the working categories exist (because of the employee relationship). I think the solution lies in creating this connection within the measure but I have no idea how to do this.

 

Could someone help me with this? If more information is needed I can provide it.

 

Many thanks in advance.

 

Teun

1 ACCEPTED SOLUTION
PaulDBrown
Super User
Super User

Create a new dimension table for Category (as you have done with employee)





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
TeunVerhagen11
Regular Visitor

Wow yeah it really is that easy. Thanks very much.

PaulDBrown
Super User
Super User

Create a new dimension table for Category (as you have done with employee)





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors