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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
alenashkel
Frequent Visitor

Default Slicer Selection Based on User Location

 Hello everyone!

 

Interesting question. I think it's not possible to execute this on power bi at the moment, but let's give it a try.

 

My report filters based on username already. I have a table for user information. Including their country.

 

Is it possible to, when a user logs in from sweden, to have sweden selected by default on the country slicer? While also being able to change the country on the slicer? 

 

I know that there is this thread on the community:

https://community.powerbi.com/t5/Desktop/How-to-Change-the-Default-Slicer-Selection-based-on-User-lo...

 

Even tho this is a great solution and a genius work around, my client is asking for to select the country and not some alternative "name" for it, like "current country".

 

Thank you !

 

Alena

3 REPLIES 3
v-yadongf-msft
Community Support
Community Support

Hi @alenashkel ,

 

If you don't want to use Row Level Security (RLS), please try following steps:

 

This is my test table:

vyadongfmsft_0-1668060850775.png

 

Please create following measures:

Current selections = COUNTROWS(DISTINCT(ALLSELECTED('Table'[Country])))

Total selections = COUNTROWS(DISTINCT(ALL('Table'[Country])))

Sales with default = IF(
    [Current selections] = [Total selections],
    CALCULATE(
        SUM('Table'[Sales]),FILTER('Table','Table'[Country] = "Sweden")),
    SUM('Table'[Sales]))

 

The sales and the slicer are always Sweden.

vyadongfmsft_2-1668061262586.png

 

 

The user can be able to change the country on the slicer.

vyadongfmsft_3-1668061367743.png

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.

Plus, it's a dynamic filter. In your case, you say specfically = sweden. This would vary depending on the user.

Thank you for your reply!

I see you did an example for sum(sales)

But this won't work for the whole report. By this I mean, it's not just one measure (like sum(sales)), it's for the whole report, with a lot of measures in it. 

This won't work for this case right?

Helpful resources

Announcements
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.