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
Anonymous
Not applicable

Create Multiple Cards from a Primary Key between two tables

New to Power BI, any help much appreciated!!

We have two tables with "Group Name" as the primary key.

 

Group NameRoles
ITDeveloper
ITDBA
ITAdmin
ITAnalyst
MarketingDesigner
MarketingWriter

 

Group NameEmployee
ITJoe
ITMike
ITJess
MarketingMia
MarketingEmma

 

We want to combine these two and form a report of multiple cards. For example:

 IT 
Employees Roles
Joe Developer
Mike DBA
Jess Admin
  Analyst

 

 Marketing 
Employees Roles
Mia Designer
Emma Writer

 

 

This was just done manually on excel for now but would like to know if there is a better way to do this using Power BI!

 

1 ACCEPTED SOLUTION

Hi  @Anonymous ,

I think there may not be a good way to solve your problem directly, I will provide an indirect method, but I am not sure if it can meet your needs:

1. You can  create a many-to-many relationship between the two tables, Roles and Employee:

many to many.PNG

 

2. Use the Group Name field as a slicer ,then create the Multi-row card (next to the Card) of the Employee field and the Roles field. After aligning the border, select Group. The results are as follows:

GROUP.PNG11.PNG

 

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-joesh-msft
Solution Sage
Solution Sage

Hi @Anonymous ,

I am not quite sure if I understand what you mean, there seems to be no logical connection between Mia/Emma in the second table and Mia/Emma in the third table. Jess in the second table and Jess in the fourth table also seem to have no relationship;

I guess you might want to integrate two tables together, then there are several ways:

 

1. Combine two tables into one table using Merge Queries;

2. Create a relationship between two tables (recommended method);

(1) Create an intermediate table and establish a relationship:

Create and manage relationships in Power BI Desktop

Create an intermediate table and establish a relationship

(2) Create a many-to-many relationship:

Relationships with a many-many cardinality in Power BI Desktop

 

If not your case, please explain the logic of your expected output.

Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

 

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @v-joesh-msft ,

 

Thank you for taking time to read, that was a mistake on the tables. I apologize. I have gone ahead and updated the tables. Let me know if that makes sense? Basically, we do not want to merge the tables but we want to create a report with multiple Card-like structures where the title of the card is the group name and it has two columns underneath (The roles and the employees that are associated with that specific group name). Something like a group-by.

 

I will however, go through the links as they might help get closer to what we want to achieve, thank you.

 

Hi  @Anonymous ,

I think there may not be a good way to solve your problem directly, I will provide an indirect method, but I am not sure if it can meet your needs:

1. You can  create a many-to-many relationship between the two tables, Roles and Employee:

many to many.PNG

 

2. Use the Group Name field as a slicer ,then create the Multi-row card (next to the Card) of the Employee field and the Roles field. After aligning the border, select Group. The results are as follows:

GROUP.PNG11.PNG

 

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you so much!! You are a genius, this helps us get near to what we need! 

 

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.