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
PlenLXox
New Member

Index multiple collumns

Hi

 

I have a table with survey data with multiple collumns featuring the following;

-Strongly disagree

-Disagree

-Agree

-Strongly Agree

 

In my visuals they are sorting in alphabetical order. What is the best way to order these in my data set so they show in the above order in my visuals, would this be an index collumn? Thanks. Novice here!

PlenLXox_0-1760525901875.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Read up on "Unpivot Other Columns" in Power Query.  Create another table with 2 columns - Response and Order.  Sort the Response column by the Order column.  Create a relationship from the Value column of the Fact table (which has the responses) to the new table.  To any visual, drag Response from the new table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
v-echaithra
Community Support
Community Support

Hi @PlenLXox ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-echaithra
Community Support
Community Support

Hi @PlenLXox ,

We’d like to follow up regarding the recent concern. Kindly confirm whether the issue has been resolved, or if further assistance is still required. We are available to support you and are committed to helping you reach a resolution.

Best Regards,
Chaithra E.

Ashish_Mathur
Super User
Super User

Hi,

Read up on "Unpivot Other Columns" in Power Query.  Create another table with 2 columns - Response and Order.  Sort the Response column by the Order column.  Create a relationship from the Value column of the Fact table (which has the responses) to the new table.  To any visual, drag Response from the new table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

@PlenLXox 

sort by which column? if not, what's the expected output based on the sample data you provided?





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

Proud to be a Super User!




I am looking for approx 10 collumns in my table to be ordered the following:

Stongly Disagree - 1

Disagree - 2

Agree - 3

Strongly Agree - 4 

 

So I can display these in the right order in a visual.

 

thanks.

what if one row is 1 and 4, another is 4 and 1 for different columns? pls clarify your logic clearly.





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

Proud to be a Super User!




PlenLXox
New Member

Sorry. I am still lost.

 

I have another table with the order, how do i add this to my data table and sort the mutiple collumns?

Hi there. Yes. so 1 row of data could contain  1, 1,3,4,1,3,2,4,2,1  for example. 

Pragati11
Super User
Super User

Hi @PlenLXox 
You need to add custom sorting to your columns.

Check if the following blog helps:

https://radacad.com/sort-a-column-with-a-custom-order-in-power-bi/

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.