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
santiagomur
Resolver II
Resolver II

issue slicer

Hi, 

 

how i can force the slicer pick the first value always. 

 

my problem i have a report that have a role filter, if i have someone selected on the slicer and then i changes the role, the slicer still with the last selection (all the visuals blank), then if i change the selection on the slicer it refresh and show the good ones.

my case the slicer contains name of competitors so i need the role filter automatic show the real values on the slicer and pick the first value (don't want to show all summarized). 

 

 

example

 

tabla A (role)

user 1

user 2

user 3

 

table B

 

user 1        Employee 1 

user 1        Employee 2

user 2        Employee 1.1

user 2        Employee 2.2

user 3        Employee 1.3

 

then i publish with someone selected to avoid the summ. (for the example i pick the employee 1 and then publish)

 

then i  log us user 2 the slicer show me employee 1.1 and 2.2 and by default employee 1 is select with all the visuals blank, if i unselect the employee 1 it desapears and show the real ones.  on this case i am showing to user 2 a name of 1 employee of user 1. 

 

 

so i need the slicer refresh and show only the real ones or a way to publish the report with the first row select by default. 

 

 

best regards 

 

 

 

 

 

 

 

 

6 REPLIES 6
v-shex-msft
Community Support
Community Support

HI @santiagomur ,

AFAIK, current power bi does not support to set a default value on slicer/filter.

According to your description, I'd like to suggest you enabled RLS filter on your report to filter records, it will apply filter effect on 'data model' side. (filter/slicer not able to affect RLS filter)

RLS with UserName()

Row-level security (RLS) with Power BI

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

thanks for the answer @v-shex-msft 

 

 

I already have the RLS, but one person can see many employees, so  if i publish without a selection, on the slicer, the personal is going to see the sum and get confused.  

 

an other solution for my problem is ...when the person open the report, always see the first person (or row) available, without the selection on the slicer before publish needed. 

 

regards

HI  @santiagomur ,

Can you please share your RLS formula? As I said, if you add a user table with username filed, you can set RLS filter based on current username.  This role is dynamic based on current username, it will change filter effect when different users open your report who enabled username RLS.

If you want some users can view multiple users' records, you can add 'user manager' table(manager id, user id) and link to 'user mapping' table, then you can apply RLS filter on 'user manager' table 'manager' field to display multiple users records.

In addition, if you still confused about how to do these, can you please share some dummy data with minimum table structure to test?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

HI @v-shex-msft  Thanks for the answer, 

 

i have a table with the user name and a RLS  formula User = UserName()

 

Example

table 1                                           

User
A
B
C

 

Table 2

UserNameAge
AJhon10
APeter20
AErik30
BFrank40
CNichols50

 

step 1 

1.png

 

 

step 2 

2.png

show as RLS user "A" the filter row is working, but i don't want to see a sum on the age card.

 

step 3 

3.png

I select "Erik" and then select to show as RLS user "A", and is perfect only show the names for user "A" the age card is not sum. 

 

step 4 

with Erik still selected change the RLS to user "B"  now the slicer show me Erik and frank, but Erik is not a name from user "B" what i want its the slicer refresh and only show me Frank.

i know the problem is that i publish with Erick selected but if i publish without, all the visual show sums, and i don't know how to publish without selection and the visuals show the data for the first row available.

( i try do the same with a chicletslicer with forced selection apply and works, when i change the RSL the slicer refresh their values) but my boss whant to use the default visuals. 
4.png 

@v-shex-msft 

HI @santiagomur ,

I  think you are misunderstanding with RLS filter. RLS filter on applying on data model level, it will directly apply changes on data moel table records. (RLS filter will change source table records, slicer/filter not effect table records) 

After you setting RLS based on username and publish to services and assign roles to your users with read permissions.  Report contents will be filtered on the data model level and these not matched records do not load to current report that they viewed.

BTW, current power bi does not contain options to setting defaut value on slicers.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

HI @v-shex-msft 

 

I understood,  but if a role have permissions to see many row the first visual they get is a sum of all the row, until a filter is made. 

 

i'm looking for a solution for this roles that have many rows, what i need is the report show by default the first row,  to avoid the sum. (what i doing  now is to select someone on the filter and then publish, but the refresh filter scenario happens)

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.