Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am dealing with survey data (Questions and Answers). My particular problem is sorting the questions in order after unpivoting.
When I unpivot all the questions they get placed in a new column called "attributes" and the loose their question in order. I would like to change this so that in the graph they are in order from 1 to the last question. I tried doing something like adding a new table with the questions and a order # with a relation but that didnt work for me. Is there a way to achieve something like this?
Questions graph(Stacked bar): (Not correct order)
Un-ordered Questions example:
This is the way the questions get put in the attributes column after unpivoting
I would like change the order to this:
1 - Question1
2 - Questio2
etc.
Thank you!
Solved! Go to Solution.
I figured it out. The values quere different from each other in the relational table and that is why ti wasn't working.
Thanks for the help!
hi, @Anonymous
You could use Sort by column in Power BI Desktop to achieve your requirement.
Before it, you need to add an index column for attributes column by your logic.
Best Regards,
Lin
@v-lili6-msft Thanks for the suggestion.
I have created an index column and attempted to sort by that order but it doesn't work as intended. What it does it assigns a duplicate numbers to the answer rows and that is making the order wrong. I also tried to use the related table with just the answers and a index column and that does not work ether. Any other ideas?
Here is how the data is being ordered:
Thanks again.
I figured it out. The values quere different from each other in the relational table and that is why ti wasn't working.
Thanks for the help!
What did you do to sort the mixed data types? Could you please state the solution? I am having the same issue here.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |