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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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

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

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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