Forum Discussion
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!
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.
9 Replies
- Ashish_MathurSuper 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.
- Pragati11Super 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/
- PlenLXoxNew 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?
- PlenLXoxNew Member
Hi there. Yes. so 1 row of data could contain 1, 1,3,4,1,3,2,4,2,1 for example.
- ryan_mayuSuper User
sort by which column? if not, what's the expected output based on the sample data you provided?
- PlenLXoxNew Member
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.
- ryan_mayuSuper User
what if one row is 1 and 4, another is 4 and 1 for different columns? pls clarify your logic clearly.
- v-echaithraCommunity 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. - v-echaithraCommunity 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.