Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

RLS by Brand

Hi All

I have brand and Country columes in Row level sequrity table


my requriment is now [email protected] in brand colume have value as All,now [email protected] should get access for All brands (Ex:[email protected] get access for 3 brands Bajaj,Vespa&Honda)

 

DAX used to impleament RLS in my dataset
NOT(ISBLANK(LOOKUPVALUE(RLS[Brand],RLS[Brand],[Brand],RLS[Email ],userprincipalname())))
can any one help me on this

Thanks
Sriram.K

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hello
    has the solution for this.

    I've created a new columume like New_Column "All." used that column in the Row Level filter.


    DAX used as row-level filter
    NOT(ISBLANK(LOOKUPVALUE(RLS[Country],RLS[Country],[New_Column],RLS[Email ],userprincipalname())))
    ||
    NOT(ISBLANK(LOOKUPVALUE(RLS[Brand],RLS[Brand],[brand],RLS[Email ],userprincipalname())))


5 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion
    Sorry, I don't understand your question. Can you provide a bit more detail and what you're tables look like? What's not working? What is your desired result?
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    If you don't set RLS, the user can see all table Brand values. Please provide me with more details about your table or share your pbix file with me.

    And show me your problem and the result you want.

    I hope the blogs about RLS can help you, links are as below:

    https://docs.microsoft.com/en-us/power-bi/guidance/rls-guidance

    https://docs.microsoft.com/en-us/power-bi/admin/service-admin-rls

    https://community.powerbi.com/t5/Service/RLS-for-default-Value-Show-all/td-p/231465

     

    Best Regards,

    Rico Zhou

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Could you tell me if your problem has been solved? If it is, kindly share your way or the reference material with us. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table or share me with your pbix file from your onedrive for business.

    Best Regards,

    Rico Zhou

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello
      has the solution for this.

      I've created a new columume like New_Column "All." used that column in the Row Level filter.


      DAX used as row-level filter
      NOT(ISBLANK(LOOKUPVALUE(RLS[Country],RLS[Country],[New_Column],RLS[Email ],userprincipalname())))
      ||
      NOT(ISBLANK(LOOKUPVALUE(RLS[Brand],RLS[Brand],[brand],RLS[Email ],userprincipalname())))


      • AllisonKennedy's avatar
        AllisonKennedy
        Community Champion
        Anonymous
        Glad it's working! Please mark the answer as a solution so others can find it easily too and benefit.