Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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???
Solved! Go to Solution.
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?
You have a typo. It is spelled USERPRINCIPALNAME().
Hi Ibendlin - can you use a Function as a varibale???
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?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |