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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Working with survey multi-answer questions

I have finally taken the plunge and decided to use PowerBI for analysing my survey data, instead of the specialised survey analysis software.

 

All is very straightforward, except when dealing with multi-answer questions. These are questions where the respondent can select more than answer (for example, "Where did you see this advert" with possible answers TV, Radio, Newspaper, Magazine).

 

The data structure of such questions looks something like this:

 

CaseB01_TVB01_RadioB01_NewspB01_MagB01_None
1 1   
2  1 
3     1
4    
...     

 

What I need is to combine these so that when I plot a bar chart for example, I'll be able to rank the popularity of each medium (so sum of 1s in each column divided by the total number of Cases).

 

I can think of a couple of ways of achieving this, but they are very very long-winded. Does anyone know of a smart and quick way? (A typical survey can have 10+ such questions which is why I'm looking for the most efficient way.)

 

Many thanks in advance!

 

George. 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

It seems that the Unpivot option may be the best solution in this case.


This would work if these were the only data I had in the table, but I have another 30 variables or so, some of which are multi-answers like the one I described. If I unpivot all of them, the table becomes a mess and it's impossible to make any sensible calculations with the other variables.


Is it possible for you to duplicate the table, remove unnecessary columns, then unpivot the duplicated table in Query Editor? By this way, you should be able to create a new table with multi questions which is similar to create a calculate table using DAX.Smiley LOL

 

Regards

View solution in original post

3 REPLIES 3
MattAllington
Community Champion
Community Champion

I suggest you unpivot the data to this shape

 

case.   Answer

1.        Tv

1.        Radio

2.        Radio

2.        News

3.        Mag

 

you don't need the 1s. 

 

You can then do a distinct count on the answer to see how many of each. 

Distinct count on Case to count the cases

divide the 2 to get an average etc

 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.
Anonymous
Not applicable

Thank you @MattAllington

 

This would work if these were the only data I had in the table, but I have another 30 variables or so, some of which are multi-answers like the one I described. If I unpivot all of them, the table becomes a mess and it's impossible to make any sensible calculations with the other variables.

 

I thought of creating a calculated table with the multi questions, but I'm not able to unpivot the columns...

Hi @Anonymous,

 

It seems that the Unpivot option may be the best solution in this case.


This would work if these were the only data I had in the table, but I have another 30 variables or so, some of which are multi-answers like the one I described. If I unpivot all of them, the table becomes a mess and it's impossible to make any sensible calculations with the other variables.


Is it possible for you to duplicate the table, remove unnecessary columns, then unpivot the duplicated table in Query Editor? By this way, you should be able to create a new table with multi questions which is similar to create a calculate table using DAX.Smiley LOL

 

Regards

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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