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

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.

Reply
Aparimita
Frequent Visitor

Sorting order of the columns in slicers on Slicer Reset as per field parameter sorting order

We are trying to create Dynamic Slicers based on field parameters, and trying to populate them in a slicer. Based on the slicer selection we are showing the values of the columns in a table. On "Select ALL" the order of the column remains intact in the table, but on resetting the slicer and upon selecting individual slicer values(multiple selections) the sequence of the columns in the table
is not maintained and the column selected from the slicers gets appended in the table as per the order in which they are selected in the slicers. We want the order of the columns in the table must be maintained as per the order we have in the Field parameter order. Please suggest if there any solutions to this.

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Aparimita 

I can offer one suggestion (PBIX attached)

  1. Create an new table containing a copy of the field parameter column (and other columns if desired). I did this with a calculated table.
  2. Create a 1:1 relationship between this copy and the original field parameter table.
  3. Use the column from the new table on the slicer.

Doing it this way, the order in which the filtered fields are displayed in the visual will always follow the Order column in the field parameter table, and not the order of selection.

 

It appears that the order of selection is followed only when the filter is applied directly on the field parameter table.

 

In attached PBIX, the order of the "Column Selection" fields is always Country-Region, Category, Color.

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

2 REPLIES 2
Aparimita
Frequent Visitor

Thanks, @OwenAuger , Your solution worked, thanks a lot for your swift response

OwenAuger
Super User
Super User

Hi @Aparimita 

I can offer one suggestion (PBIX attached)

  1. Create an new table containing a copy of the field parameter column (and other columns if desired). I did this with a calculated table.
  2. Create a 1:1 relationship between this copy and the original field parameter table.
  3. Use the column from the new table on the slicer.

Doing it this way, the order in which the filtered fields are displayed in the visual will always follow the Order column in the field parameter table, and not the order of selection.

 

It appears that the order of selection is followed only when the filter is applied directly on the field parameter table.

 

In attached PBIX, the order of the "Column Selection" fields is always Country-Region, Category, Color.

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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