Forum Discussion
Combine and sort two unpivot graphs
Hi PowerBI_JJ ,
As per my understanding, you have prepared both charts based on score and want to sort it,
you can sort the charts as follows by going into 3 dots, then sort axis and choose your measure being used on the chart. (I believe you are already doing this)
Now to also sort your categories, as I can see, you have a column with sort order along with category, so you can follow the steps to sort your category by using your sort order column . Select the category column, and then select sort by column option and choose your sort order column.
Now you can see the changes of chart category sorted according to the sort order.
Hope it helps.
Please mark this as a solution, if it resolves your issue.
Thank you for your reply.
But this is not exactly what i mean.
In a survey respondents give their scores to a few items. For example:
- Quality
- Waiting time
- Service
- Delivery
Respondents give a score between 1 - 10 to each aspect.
I made two unpivot tables with categories and values. For example:
Table 1:
- Quality (categorie: 1-5), (categorie: 6-7), (categorie: 8-10)
- Waiting time (categorie: 1-5), (categorie: 6-7), (categorie: 8-10)
- Service (categorie: 1-5), (categorie: 6-7), (categorie: 8-10)
- Delivery: (categorie: 1-5), (categorie: 6-7), (categorie: 8-10)
And table 2:
- Quality (1, 2, 3, 4,.... 10)
- Waiting time (1, 2, 3, 4,.... 10)
- Service (1, 2, 3, 4,.... 10)
- Delivery (1, 2, 3, 4,.... 10)
With the first table I made a graph with categories and with the second table a graph with averages scores (in the image in my 1ste message I placed the 2de graph behind the frist graph (so you see the categories of graph 1 and the average scores of graph 2).
I can sort the 2nd graph via the .... from high to low.
But i want also sort the first graph in the same way (so also based on the average scores).
If i set a filter, the order must be changed each time. So the order of both graphs is dynamic based on the 2nd graph.
- PowerBI_JJ1 year agoNew Member
To make it more clear.
The 9,0 doesn't belong to wachttijd, but to vriendelijkheid, the 8,1 doesn't belong to administratie, etc...
How can i sort wachttijd, vriendelijkheid, etc. based on the scores in the graph that is laying below? - AnushaSri1 year ago
Resolver II
Sorry for misunderstood,
So when you say, "With the first table I made a graph with categories" May I ask, what is the measure you used on a graph with categories?correct me if I am wrong, I guess you have used the following
on y-axis - items/attributeslegend - Categories
x-axis - is it average score?
And your second table a graph with average score is setup some thing like this on x and y-axis
if this is the case, then you can sort both the graphs by Averagescore, because both are technically looking at average score for each of your items/attributes. only thing is on your first graph , in addition your are looking at average score percentage for each category.
So technically both are same, the way you presenting is different, so you can confidentally sort both graphs by averagescore and also filter wont be an issue. both of your graphs will be sorted similarly even when you apply filters.
Here is an example, both graphs before applying filterboth has same sort after applying filter
Hope it helps, Feel free to raise your point if it is not what you are looking for. if it resolves your issue, please Mark this as a solution.
- PowerBI_JJ1 year agoNew Member
Thank you.
For the first graph i use attribute on x-as, value on legend (the 4 categories) and % count of index in y-as.For the 2nd graph i use attribute on x-as and average of value on y-as.
- AnushaSri1 year ago
Resolver II
Hi PowerBI_JJ on your first graph with %count, add average score in tooltips, so that it gives ability to sort by averagescore.
1.
2.
Now apply the same sorting order by using average acore on your other graph, so that both will be in sync and will always sort on the basis of same measure.
Hope it helps, Feel free to raise your point if it is not what you are looking for. if it resolves your issue, please Mark this as a solution.