Forum Discussion

santiagomur's avatar
santiagomur
Resolver II
6 years ago

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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

    • santiagomur's avatar
      santiagomur
      Resolver II

      thanks for the answer Anonymous 

       

       

      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

      • Anonymous's avatar
        Anonymous
        Not applicable

        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