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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
smstrickland
Helper I
Helper I

Unwanted data repeated in matrix

I am getting data from two sources. One source includes projects, employees, and the number of hours employees are assigned per project. the second source includes projects, employees, and the number of hours employees charged to projects per pay period. The two tables have a many-to-many cardinality, and I have not been able to figure out how to connect the number of hours assigned per employee per project to the number of hours charged per employee per project per pay period. I can either get the total number of hours charged for all employees on the project

 

    Example =  Project Name       Employee       Hours Assigned          Hours Charged

                       Project ABC          John Doe             50                             125

                                                    Jane Smith           75                             125

                                                    Jo Cooper            100                           125

 

or I can get the individual number of hours charged per employee, but it is copied for each employee with assigned hours

 

    Example =    Project Name       Employee       Hours Assigned          Empl_ID                 Hours Charged

                         Project ABC          John Doe             50                            JD1                           25

                                                                                                                  JS1                           50

                                                                                                                  JC1                           50

                                                     Jane Smith           75                             JD1                          25

                                                                                                                  JS1                           50

                                                                                                                  JC1                           50

                                                     Jo Cooper            100                           JD1                          25

                                                                                                                  JS1                           50

                                                                                                                  JC1                           50

 

Any advice or suggestions on how to fix this problem is appreciated.

 

Thank you,

Shauna

1 ACCEPTED SOLUTION
kentyler
Solution Sage
Solution Sage

Try a star schema hours.PNG

If you filter by the shared dimension... Employee...you should get both hours assigned and hours charged.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @smstrickland 

Agreed with kentyler, here are details how to implement it:

create two tables

employee = DISTINCT(UNION(VALUES(Table1[Employee]),VALUES(Table2[Employee])))

project = DISTINCT(UNION(VALUES(Table1[Project Name]),VALUES(Table2[Project Name])))

Create relationships

Capture13.JPG

Finally, add columns into a matrix visual

Capture12.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
kentyler
Solution Sage
Solution Sage

Try a star schema hours.PNG

If you filter by the shared dimension... Employee...you should get both hours assigned and hours charged.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.