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
scott3387
Frequent Visitor

Merging two tables in one visualisation

Hello,

 

Sorry this has probably been asked but I'm not sure what keywords to search for. I have one table with specific shifts worked.

 

Owning UnitEmployeeDuty DateRegistered?Shift TypeLots of other cols not relevent to this question...
A&Ejoe bloggs25/01/2021RegisteredNight 
A&EJane Brown26/01/2021UnregisteredNight 
AMUGeorge Green25/01/2021RegisteredDay 

 

and another table used as a lookup which tells me how many people should be working on a day, in a given unit, for a given Registration and shift type. Every day is the same and does not change.

 

Owning UnitRegistered?ShiftValue
A&ERegisteredNight2
A&ERegisteredDay

3

A&EUnregisteredNight

1

AMURegisteredNight

2

etc...

 

I want to merge the two tables to get the following matrix. Note Trained and Registered are the same thing.

 

Capture.PNG

 

However I'm not sure what the best way to go about this would be. I have produced a crossjoined version of the LU with dates and I tried merging fields to make a key but couldn't get much further.

 

Thanks

2 REPLIES 2
v-yuaj-msft
Community Support
Community Support

Hi @scott3387 ,

 

Sorry for that I'm still a little confused about what would you like to do. I did a test. Is the following result what you want?

v-yuaj-msft_0-1611715424411.png

 

 

Best Regards,

Yuna

 

Geradav
Responsive Resident
Responsive Resident

@scott3387 

 

It seems the column Owning Unit is the column in common between both tables.

Has one of those two tables have unique values in the Owning Unit column? Could this column be used as a Primary Key for a one-to-many relationship in the data model of Power BI?

 

Otherwise, you could use the merge feature in Power Query to combine both tables into one based on the Owning Unit column.

 

Not knowing your data, not sure which solution would be best.

Maybe give us a bit more information as well as if you familiar with establishing relationships in the data model.

 

David

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.