Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

USerprinciple Name

Hi Experts

 

I am using the following dax to restrict access to data in PBIX based on Country and Stores in the Country . But when i test the DAX in Managed Role it returns back nothing 

 

VAR _USERPRINCIPLENAME = "[country_dim.country_name];[bu_code]"

VAR SeparatorPosition = SEARCH(";",_USERPRINCIPLENAME)

VAR Country = LEFT(_USERPRINCIPLENAME, SeparatorPosition - 1)

RETURN

CONTAINSSTRING(Country, CONCATENATE("(", CONCATENATE([country_dim.country_name],")")))

Should tell me who is logged in???

  • lbendlin's avatar
    lbendlin
    3 years ago

    sorry, my bad - I did not read your code careful enough. Apologies.

     

    What locale are you using for your code?  Can you  show the data model to confirm that RLS is applied to the right table?

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Ibendlin - can you use a Function as a varibale???

      • lbendlin's avatar
        lbendlin
        Super User

        sorry, my bad - I did not read your code careful enough. Apologies.

         

        What locale are you using for your code?  Can you  show the data model to confirm that RLS is applied to the right table?