Forum Discussion
alenashkel
3 years agoFrequent 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 tabl...
v-yadongf-msft
Community Support
3 years agoHi alenashkel ,
If you don't want to use Row Level Security (RLS), please try following steps:
This is my test table:
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.
The user can be able to change the country on the slicer.
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.
alenashkel
3 years agoFrequent Visitor
Plus, it's a dynamic filter. In your case, you say specfically = sweden. This would vary depending on the user.