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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kattlees
Post Patron
Post Patron

Get values from 3 tables into one matrix

I need to get the sum of three columns from two different tables and can't figure out why I'm struggling with it.

 

Tables are: Employees

EmployeeIDLocation
MINN0001Loc1
MINN0001Loc2
SMIT0001Loc1
JONE0001Loc1

 

Table 2: Amt Pd:

EmployeeIDLocationColorDateAmtPd
MINN0001Loc1Green12/31/215.00
SMIT0001Loc1Green12/31/215.00
MINN0001Loc1Blue12/31/2110.00
SMIT0001Loc1Blue12/31/218.00
JONE0001Loc1Green12/31/2112.00
MINN0001Loc2Blue12/31/217.00

 

Table3: Amt Earned

EmployeeIDLocationDateColorAmtEarnedAmtEr     
MINN0001Loc112/5/21Blue2.001.00     
MINN0001Loc112/17/21Blue3.001.00     
MINN0001Loc112/5/21Green7.005.00     
SMIT0001Loc112/17/21Blue3.001.00     
SMIT0001Loc112/5/21Green5.002.00     
JONE0001Loc112/5/21Blue05.00     
           

 

Result I need is a matrix: (Choosing Blue and Loc1)

EmployeeIDLocationDatePdEarnedEr
MINN0001Loc112/31/2110.005.002.00
SMIT0001Loc112/31/218.003.001.00
JONE0001Loc112/31/210.000.005.00

 

Result I need is a matrix: (Choosing Green and Loc1)

EmployeeIDLocationDatePdEarnedEr
MINN0001Loc112/31/215.007.005.00
SMIT0001Loc112/31/215.005.002.00
JONE0001Loc112/31/2112.000.000.00

 

I know I can need to get the end of the month from the paid column but for the life of me I can't figure out how to do the relationships to get the matrix options I need.

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @kattlees 

 

I add EmployeeLoc columns to all three tables by combining EmployeeID and Location columns. And build relationships on these new columns. Also I add dim tables for colors and locations. Download the attachment below to see details. 

22011202.jpg

22011203.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @kattlees 

 

I add EmployeeLoc columns to all three tables by combining EmployeeID and Location columns. And build relationships on these new columns. Also I add dim tables for colors and locations. Download the attachment below to see details. 

22011202.jpg

22011203.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

smpa01
Super User
Super User

@kattlees  create separate dimension tables for Location and Color and model the data accordingly. Then bring slicers from those tables.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.