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
arunbyc
Helper II
Helper II

data modeling - Inactive relation - need it to be active.

The model, among other tables, primarily consists of a Date table, Employee table, Time_sum, and Time_detail.
The structure is as shown in the diagram.

Time_Sum table has the Total time spent on certain dates  by certain employees (depending on certain criteria)

Time_Detail contains the time for all dates for all employees on each of the projects they worked on, 

Employee tale and date table are what they are. 

The requirement is: When an employee's record for a given date is selected in Time_Sum table, the detail table (or matrix) should be filtered to show the records of the employee - not for that date but for the entire period selected in the date slicer.

 

Had the requirement been to show all time spent by the selected employee on all projects, for the day selected, I could have created a "Date &Employee_id" calculated field in both the summary and detail tables and linked them through a one-to-many relation. 

But in order to get all records of the employee, I set up a bi-directional relation between Time_sum table and the Employee table, and then a 1 to many (single) relation between the employee table and Time_detail. This works. The only hitch is it gives me all the records of the employee for all days in the time_detail table. Not just for the days selected in the date slicer.  

The date table is already connected to the Time_sum. So It is not letting me connect the date table to Time_detail as an active connection.

How can I get the detail table to show only the records per the date slicer, for the employee selected in Time_Sum table. Is the way I set up the model correct?

Thanks

AR

Screenshot 2025-01-09 021536.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

What's your reasoning for the bidirectional connection?

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

What's your reasoning for the bidirectional connection?

I got it to work. I just did not know that I can simply make the inactive relationship active.when the field is connecting to two different tables and not to two fields in the same table. Just had to make it active and it worked.

BRW the reason for bi-directional connection is because the common connection betwwen the two time tables is the composite Employee_no and date. While that gives a proper 1to many connection, the requirement is to get all records of employee to br filtered. But i cant connect by just employee because it is many to many. So I thought I has to use employee table as the via media to propagate the relationship from time-sum to time_detail.

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!

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.