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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Likhitha
Helper IV
Helper IV

To make one slicer selection as fixed and remaining as dynamic

Hello all,

    Is it possible to make one slicer selection fixed at first position and other slicer selections are dynamic in power bi??
SE.PNG

 In the above picture,I want to make USA as my fixed selection for all years and USA bar should be in first position, Is it possible??

2 ACCEPTED SOLUTIONS
JoyCornerstone
Resolver II
Resolver II

 Add a column to the table with the countries called Sort Order that has unique values. USA would be 1.  Then select the Country Name column and in your toolbar select "Sort By Column"  and the "Sort Order" or Index or whatever you named it.

Sort.PNG

View solution in original post

ntaylo06
Resolver II
Resolver II

If I am understanding correctly you want the US to always be shown first in bar clusters and then all other countries listed after in no particular order. To do this follow these steps:

1. Duplicate your data source (or start a fresh one from the same data source)

2. Remove all columns except for [Country] and name the table something like 'Legend Sort'

3. Create a new calculated column in 'Legend Sort' that uses this logic: 

Sort Order = IF([Country] = "USA", 1, 2)

4. Create a relationship between 'Legend Sort' and your data 

5. Select the [Country] field in your clustered bar visual and then sort it by column like JoyCornerstone said (above). You should then be able to sort by [Sort Order] and USA will be displayed first.

 

 Here is a link to a useful blog post. Let me know if this makes sense.

 

View solution in original post

5 REPLIES 5
ntaylo06
Resolver II
Resolver II

If I am understanding correctly you want the US to always be shown first in bar clusters and then all other countries listed after in no particular order. To do this follow these steps:

1. Duplicate your data source (or start a fresh one from the same data source)

2. Remove all columns except for [Country] and name the table something like 'Legend Sort'

3. Create a new calculated column in 'Legend Sort' that uses this logic: 

Sort Order = IF([Country] = "USA", 1, 2)

4. Create a relationship between 'Legend Sort' and your data 

5. Select the [Country] field in your clustered bar visual and then sort it by column like JoyCornerstone said (above). You should then be able to sort by [Sort Order] and USA will be displayed first.

 

 Here is a link to a useful blog post. Let me know if this makes sense.

 

@ntaylo06 , @JoyCornerstone  Its Working ...Thank You 🙂

JoyCornerstone
Resolver II
Resolver II

 Add a column to the table with the countries called Sort Order that has unique values. USA would be 1.  Then select the Country Name column and in your toolbar select "Sort By Column"  and the "Sort Order" or Index or whatever you named it.

Sort.PNG

@JoyCornerstone  i'm having different years data with same countries in one table,so how to give  sort order number for same countries (mean the same number for same countries r else different number)?

That's a problem. In order for it to work, you'll have to add a Country Table with a sort order and link that to the country you have in the table you are looking at here.  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.