Forum Discussion
Sorting on Parameter fields measures
- 3 years ago
v-yadongf-msft well yeah of course I can sort it manually but the whole purpose of using Power BI is to make data handling better, easier to use and visually better than manual work 😁.
Anyway thru several online post I came up with a solution myself for this problem.First of you need to make an extera column in the parameter field table:
It is a copy of the main column in the table but for some reason you cannot use that one.
(getting error about the composite key etc)
When you have that you kan make a variable Rank Measure like:
And when you switch to USD view:
Works like a charm! 😁
And if you don't want to show the rank measure in your visual you can turn word wrap of in column header and the values and then you can just hide the column by sliding the width all to the left making it so narrow that it will nog show anymore.
For a chart even more easy, you just put it in the tooltips and then you can still sort on it but it won't show in the graph.
Hi rpinxt ,
The sorting of field parameter is the same as the sorting of common fields, which can be ascending or descending.
What problems are you having with sorting field parameters ? Can you explain it with some screenshots?
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- rpinxt3 years agoSolution Sage
I don't think sorting is the same. Because parameter fields change the visual (which they are intended to do).
Here are some examples :
So here you see the visual is sorted by BO Qty descending.
At the top you see I have a slicer with BO Qty and USD Amt which are parameter fields.
(set up with the new parameter function in Power BI)
Now I switch the view to dollars instead of quantities:
Now you can clearly see that the visual is not sorted anymore by anything.
Probably logical because BO Qty is not in the visual anymore.
I love the new feature with field parameters but this is a big downside still.
The visual should have the variable parameter name in as a sort option not the field name that is currently selected:
Is there a way around?
So make the visual sort on the selected measure?