Forum Discussion
Anonymous
3 years agoNot applicable
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???
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
- lbendlinSuper User
You have a typo. It is spelled USERPRINCIPALNAME().
- AnonymousNot applicable
Hi Ibendlin - can you use a Function as a varibale???
- lbendlinSuper 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?