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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
dejudicibus
Frequent Visitor

How to link labels and values of different tables

Let's suppose that I have three spreadsheet. The first one (QUESTIONS.XLSX) is a list of questions. Each question has a unique identifier. For example:

 

QCodeQText
Q1Do you like potatos?
Q2Do you like tomatos?
Q3Do you like bananas?

 

The second one (ANSWERS.XLSX) is a list of answers that are good for each question. For example:

 

ACodeATextAValue
A1;Not at all0
A2Not much1
A3Quite a lot2
A4A lot3

 

The third (SURVEY.XLSX) is the result of an anonymous survey using those questions and answers:

 

PCodeQ1Q2Q3
P1A3A2A1
P2A1A3A3
P3A3A1A1
   
P100A1A2A2

 

How can I connect them in PowerBI considering that the LABELs of each column in SURVEY but the first one — representing anonymously the people who participated to the survey — are the values of column QCode in QUESTIONS; and that the VALUES of each column in SURVEY but the first one, are the values of column ACode in ANSWERS?

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@dejudicibus , Unpivot the third table

https://radacad.com/pivot-and-unpivot-with-power-bi

 

if need merge all three tables. https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

Icey
Community Support
Community Support

Hi @dejudicibus ,

 

Just like what @amitchandak mentioned, it is suggested to use "UnPivot" and "Merge" to transform your data. For detailed stpes, please check:

steps.gif

 

Or, just unpivot the Survey table and don't merge them. Then use relationships to connect three tables.

relationships.PNG

 

 

 

Best Regards,

Icey

 

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
Icey
Community Support
Community Support

Hi @dejudicibus ,

 

Just like what @amitchandak mentioned, it is suggested to use "UnPivot" and "Merge" to transform your data. For detailed stpes, please check:

steps.gif

 

Or, just unpivot the Survey table and don't merge them. Then use relationships to connect three tables.

relationships.PNG

 

 

 

Best Regards,

Icey

 

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

Think of all, thank you for advice. I do not know Unpivot feature, so it looks like I have to study. I will work on that and let you know if works. I appreciate your help.

amitchandak
Super User
Super User

@dejudicibus , Unpivot the third table

https://radacad.com/pivot-and-unpivot-with-power-bi

 

if need merge all three tables. https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Unpivot is really a powerful feature. Thank you very much, to you and to @Icey for tutorial. Thank you.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.