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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
chniva
Regular Visitor

Survey data with multiple columns for nationality

The data has 9 columns with a different nationality in each column.  For example, column 1 is white, column 2 is Hispanic, column 3 is African American, etc.  Unfortunately, the survey allowed the person to select more than one nationality.  So I could have white and Hispanic which makes merging the columns a problem.  

 

What can I do so the user can select one of the nationalities and still show the survey data accordingly?    

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi chniva,

 

If there are multiple columns to unpivot, what I do is to duplicate the table and split the columns among the tables and then load all and create relationship and use them in the power bi dashboard.

 

Like two tables with two different columns or information and keep the survey ID or something common to create relationship and later show them together in the dashboard.

View solution in original post

6 REPLIES 6
chniva
Regular Visitor

Are you saying a different table for each nationality or one table and then unpivot?

chniva
Regular Visitor

That makes sense.  I was hoping to not have to do so much 'cleaning', but that is the best option.  Thank you!

Anonymous
Not applicable

Hi chniva,

 

If there are multiple columns to unpivot, what I do is to duplicate the table and split the columns among the tables and then load all and create relationship and use them in the power bi dashboard.

 

Like two tables with two different columns or information and keep the survey ID or something common to create relationship and later show them together in the dashboard.

pratyashasamal
Memorable Member
Memorable Member

Hi @chniva ,
You can use unpivot column option to resolve this issue .
You can combine all the nationality column into attribute and value column .
You can follow this link for refernce : https://learn.microsoft.com/en-us/power-query/unpivot-column

Thanks ,
Pratyasha Samal 
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi Pratyasha.  Thank you so much for the reply.  That is a great idea.  What if I need to unpivot additional columns?  The rest of the survey is structured the same way.  The questions are in columns and not rows.  In those cases, I used 'unpivot other' to restructure the data, but those surveys did not have multiple nationality columns.  What do you recommend to restructure the questions and nationality?

Hi @chniva ,
This is going to be a dynamic process . You unpivot all column expect the name column after separtion each nationalities.
Thanks ,
Pratyasha 
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors