Forum Discussion

sidyahmet's avatar
sidyahmet
Frequent Visitor
2 years ago
Solved

Row level security with multiple profil

Personnel table

 

id_useruseremailstatusstore
1jonathan32[email protected]Directeur des ventesToulouse
2maxgrant[email protected]Chef de storeCannes
3lberry[email protected]VendeurMetz
4arnoldsamantha[email protected]VendeurLe Havre
5ijohnson[email protected]VendeurNantes
6leahsmith[email protected]Chef de storeSaint-Paul
7derrickchung[email protected]VendeurCréteil
8robertholloway[email protected]VendeurRoubaix


status colonne have three profile "Directeur des ventes","Chef de store"and "Vendeur".

I need to create a dynamic role in power bi desktop to filter data by email and status using Userprincipalname().
- User with status Directeur des ventes, can show all data any restriction with this user
- User witht status Chef de store can only see data associated with their store
- User with status Vendeur can only see row with only data.
I beguin doing this role  formula in dax role Email=Userprincipalname() 
How can I improve the formula to account for the cases mentioned above?


1 Reply