Forum Discussion
Data Modeling
- 1 year ago
Hi nchamilton2 ,
Thank you for reaching out to Microsoft Fabric Community.
To model this scenario effectively, create a unified table called CombinedAssignments in Power Query. Start by taking the ProjectUserAssigned table, and add a column named AssignmentType with the value "Project" and a TaskID column set to null. Then, take the ProjectTaskUserAssigned table, merge it with the ProjectTask table to bring in the related ProjectID, and add an AssignmentType column with the value "Task". Ensure both datasets have the same structure: EmployeeID, ProjectID, TaskID, and AssignmentType, and append them together into the new CombinedAssignments table.
Next, in the data model, create many-to-one relationships from CombinedAssignments to Employees (via EmployeeID), to Projects (via ProjectID), and to ProjectTask (via TaskID). This combined approach allows you to pull in employee details from the Employees table and clearly identify whether the assignment is at the project or task level using the AssignmentType column.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you!!
Hi nchamilton2
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523