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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Dean_R
Regular Visitor

Sort Visual on Field Parameter

I have just added a Field Parameter to my report to allow a visual to switch between Date, Week and Month with Week and Month as Calculated Columns in a table. It works great with the slicer changing the X-Axis based on the selection but each time it changes the visual defaults to sorting by the Y-Azis value (in this case a count).

 

When I set the sort order manually on the visual it recognises the selected field as the X-Axis and sorts but then as soon as the parameter is changed this is lost as you switch backwards and forwards.

image.png

image.png

image.png

I have tried creating a linked table and defining the sort order to be used in the parameter but have not had any luck.

 

Any ideas or is this due to the pass through of the field parameter not being able to store your sort changes when a new field has replaced the previous?

1 ACCEPTED SOLUTION

Step by step solution:

Step 1: Create the Blank Measure

    • Go to the "Modeling" tab in Power BI Desktop.
    • Click on "New Measure."
    • Name the measure (e.g., SortBlankMeasure) and use the following DAX formula:

       

      Create a New Measure:
     
    SortBlankMeasure = BLANK()

Step 2: Add the Blank Measure to the Chart

  1. Select Your Visual:

    • Click on the visual (chart or table) where you want to apply the sorting.
  2. Access the Fields Pane:

    • In the Visualizations pane on the right side, you'll see a section called "Fields."
    • This section shows the fields and measures currently used in the visual.
  3. Add the Blank Measure to the Tooltip:

    • Scroll down to find the "Tooltip" area within the Fields section.
    • Drag the SortBlankMeasure from the Fields list and drop it into the "Tooltip" section.

    Note: The Tooltip section is usually at the bottom of the Fields pane. If you don’t see the Tooltip section, it’s possible that the visual you’re using doesn’t support tooltips, in which case this method may not be applicable.

Step 3: Sort the Visual by the Blank Measure

  1. Sort the Visual:
    • Once the blank measure is added to the Tooltip, click on the three dots (ellipsis) at the top-right corner of the visual to access the "Sort by" options.
    • You should now see the SortBlankMeasure as one of the sorting options.
    • Choose to sort the visual by SortBlankMeasure.

View solution in original post

21 REPLIES 21
lbendlin
Super User
Super User

I think the developers of the Field Parameters feature have not considered your scenario. 
One thing you can do is explicitly "sort a column by another column"  for the field parameters you included. NOTE:  This currently assumes ASCending sort which is not optimal when you expect new values in your column. The better default would be DESC.

 

Alternatively you can raise it as an issue/feature request.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors