Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
rpinxt
Solution Sage
Solution Sage

Field Parameters sort order

First of Field Parameters are great....but there is a really anoying downside when switching between fields.

The sorting breaking.....

I see alredy complaints about that from a year ago, but has it been solved by now? Or are there good solution?

 

I have a graph that has country on the x-axis and on the y-axis I have a field parameter.

2 option, #deliveries and Quantity.

Works perfect but I want my graph to sort always with the highest number of deliveries (#deliveries) or highest quantity.

But every time you switch the sorting breaks and it will be sorted by Country on the x-axis.

 

This makes no sense as you want the highest numbers to show first and not country alphabetical.

1 ACCEPTED SOLUTION
rpinxt
Solution Sage
Solution Sage

Oh my I had an epiphany 😆

I manged to create a sort measure:

rpinxt_0-1681385051970.png

rpinxt_1-1681385065092.png

As you see the heading for this field stays the same and this way the sorting gets not broken.

But the SortValue field takes the value of the field parameter.

 

Did this with an IF statement on the prm sort order :

SortValue = IF(
    SELECTEDVALUE(prm_Measure[prm_Measure Order]) = 0,
    [#Deliveries],
    [LastQty]
)
 
So I only had 2 options, 0 and 1.
Linked both options to their corresponding base measure (like you also do in the parameter).
Now the SortValue field has always the same value as the parameter field but the heading stays the same and thus the sorting setting will not be broken 😄
 
Ah yes you can put this field in a graph with the tooltips.
Won't do anything but it wil show up as an option to sort on! 😉

 

View solution in original post

3 REPLIES 3
datamomgit
Frequent Visitor

This solution really helped us!  Thanks!

rpinxt
Solution Sage
Solution Sage

Oh my I had an epiphany 😆

I manged to create a sort measure:

rpinxt_0-1681385051970.png

rpinxt_1-1681385065092.png

As you see the heading for this field stays the same and this way the sorting gets not broken.

But the SortValue field takes the value of the field parameter.

 

Did this with an IF statement on the prm sort order :

SortValue = IF(
    SELECTEDVALUE(prm_Measure[prm_Measure Order]) = 0,
    [#Deliveries],
    [LastQty]
)
 
So I only had 2 options, 0 and 1.
Linked both options to their corresponding base measure (like you also do in the parameter).
Now the SortValue field has always the same value as the parameter field but the heading stays the same and thus the sorting setting will not be broken 😄
 
Ah yes you can put this field in a graph with the tooltips.
Won't do anything but it wil show up as an option to sort on! 😉

 

@rpinxt Great idea to solve this issue. There is another way I saw in a youtube video by Christine Payton where she uses bookmarks to get the right sorting order. I found this very creative, but your solution is more fitting for my use case.

 

Thank you!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.