Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

RLS Security default slicer selection

Not sure, if i am writing this at correct place. If no, i am sorry but i don't know where to raise it.

I have below user's data. I have setup RLS
User                     Product
User1                   Product 1
User1                   Product 2
User1                   Product 3
User2                   Product 4
User2                   Product 5
User2                   Product 6

I want, "Product 1" should be default selection when User1 logged in and "Product 4" default selection for when User2 logged in. In other words, first valid value per user should be selected. Can we do this in Power BI? Please let me know.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Currently, we cannot set default value for slicer in power bi desktop. We can create a new calculated column to work around.

    Please check following steps as below, this might help you:

    1.    Create a calculated column:

           Column = IF( 'Table'[product] = "product1" || 'Table'[product] = "product4","default",'Table'[product])

    2.    Create a slicer by product and select “default”

    3.    Result would be shown as below when we view as different roles:

    Pbix as attached, hopefully works for you.

     

    Community Support Team _ Jay Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • aastha's avatar
    aastha
    Regular Visitor

    HI Anonymous 

     

    MY requirement if different than above. Can you please help on this.

     

    User                     Product
    User1                   Product 1
    User1                   Product 2
    User1                   Product 3
    User2                   Product 2


    I want, "Product 1" should be default selection when User1 logged in and "Product 2" default selection for when User2 logged in.