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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
IvoM
Frequent Visitor

Relations with tables

Hello everyone,

 

I have been stuck on this one for a while now. I have 2 dim tables:

  • contract
  • employes

I have fact table for OPERATION_HISTORY and ATTENDANCE

In the contract table is a list of productions for company, the employes is list of employes.

 

Operation_history is table containig information about operations and time needed for work. The attendance have information about how long the employe was present in work.

 

I would like to calculate the productivity by dividing the operation history by attendance.

I want to be able do to it for the contract and individuals.

 

Here is the model view:

 

IvoM_0-1706274419201.png

The result is this:

 

IvoM_1-1706274472259.png

 

When filtering the contract all is fine. But when I filter individuals:

 

IvoM_2-1706274524518.png

 

It correctly sums the attendance but it will sum all operation history. 

 

I can't create the relation between employes and operation history because I already have the relation between contract and employes. If I remove the relation beween contract and employes and have relation between employes and operation history I get the same result but for attendance.

 

Can you point me in some direction how to solve this problem?

 

Many thanks.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@IvoM  I see that there's an inactive relationship between employes and operation history. Have you tried using the USERELATIONSHIP DAX function in your measure that involves both those tables?

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@IvoM  Yes it does, and you're quite welcome!

Anonymous
Not applicable

@IvoM  I see that there's an inactive relationship between employes and operation history. Have you tried using the USERELATIONSHIP DAX function in your measure that involves both those tables?

I had no idea this was possible 😊 It opens up a whole new world of possibilities. Thank you so much, it solved my problem.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.