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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
PowerMyBI
Helper I
Helper I

Guidance on categorising data from an Microsoft Forms survey

Hi BI forums, I've performed a detailed survey using Microsoft Forms which outputs all of the results into a spreadsheet. The survey had multiple sections and unfortunately sections do not export to the table. I'm looking for a way to sort the many columns of the table into the sections from the original survey as I'll need to be able to visualise the data by section. I also need to be able to sort the multi-choice responses. I'm familiar with defining a custom sort order using an additional table but I'm unsure how to appply the sort order to multiple columns

 

Example data;

NameWord ExperienceExcel ExperiencePhotoshop ExpereinceIndesign Experience
SarahBasic levelAdvancedIntermediateAdvanced

John

IntermediateBasic levelNo experienceNo experience
MikeAdvancedNo experienceIntermediateAdvanced
EmilyAdvancedIntermediateBasic levelBasic level

 

I would like to know the best method to categorise the columns above for example Word Experience and Excel Experience would both fall under the 'Office' section while Photoshop and Indesign would be 'Adobe'.

 

Additionally I'll need to be able to apply sorting to multiple columns. For example;

ResponseSorting
No experience0
Basic level1
Intermediate2
Advanced3

 

Thanks in advance for any tips and pointers. Much appreciated.

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @PowerMyBI ,

 

Here's the solution.

1.Select the Name column, click 'Unpivot Other Columns'.

vstephenmsft_0-1658216951078.png

vstephenmsft_1-1658216964920.png

 

2.Create a calculated column for sorting. 

Sorting = 
RANKX (
    'Table',
    CALCULATE (
        COUNT ( 'Table'[Value] ),
        FILTER ( 'Table', [Value] = EARLIER ( 'Table'[Value] ) )
    ),
    ,
    ASC,
    DENSE
)

vstephenmsft_2-1658217822368.png

 

 

 

Best Regards,

Stephen Tao

 

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

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @PowerMyBI ,

 

Here's the solution.

1.Select the Name column, click 'Unpivot Other Columns'.

vstephenmsft_0-1658216951078.png

vstephenmsft_1-1658216964920.png

 

2.Create a calculated column for sorting. 

Sorting = 
RANKX (
    'Table',
    CALCULATE (
        COUNT ( 'Table'[Value] ),
        FILTER ( 'Table', [Value] = EARLIER ( 'Table'[Value] ) )
    ),
    ,
    ASC,
    DENSE
)

vstephenmsft_2-1658217822368.png

 

 

 

Best Regards,

Stephen Tao

 

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

amitchandak
Super User
Super User

@PowerMyBI , My advice would be to unpivot this table and use

 

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you @amitchandak that is indeed the best approach. Do you have any advice for how I might be able to apply a sorting to multiple columns in the most efficient way? 

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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