Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I need help to figure how see all info in my database for the users listed as "administrador".
The problem is that "Administrador" are not an option in the fact table but is an option in the dimension table "RLS".
Also exist blanks rows for "VISION", this should not affect the other views.
https://github.com/MathiasChaparroItau/PBI-Files
Part of the Fact Table
FECHA | DESCRIPCION | TIPO | VISION | IMPORTE |
31/10/2021 | GASTOS ADMINISTRATIVOS | FIJO | MARKETING | 220 |
31/10/2021 | EGRESOS EXTAORDINARIOS | FIJO | GERENTES | 243 |
31/10/2021 | EGRESOS EXTAORDINARIOS | PROYECTO | CUENTA NUEVA | 154 |
31/10/2021 | GASTOS ADMINISTRATIVOS | FIJO | 56 | |
31/10/2021 | GASTOS ADMINISTRATIVOS | FIJO | MARKETING | 131 |
Table RLS
RESPONSABLE | VISTA | ID Perfil | CORREO |
Mathias Chaparro | ADMINISTRADOR | 1 | |
Jose Benegas | ADMINISTRADOR | 1 | jose.benegas@mail.com.py |
Sylvana Areco | ADMINISTRADOR | 1 | Sylvana.areco@mail.com.py |
Adriana Lopez | MARKETING | 2 | |
Alfredo Prono | MARKETING | 2 | Alfredo.prono@mail.com.py |
Andres Cubas | GERENTES | 3 | |
Andrea Heleno | GERENTES | 3 | Andrea.heleno@mail.com.py |
Jose Cardenas | GERENTES | 3 | Jose.cardenas@mail.com.py |
Alejandro Gonzalez | CUENTA NUEVA | 4 | Alejandro.gonzalez@mail.com.py |
Catalina Areco | CUENTA NUEVA | 4 | Catalina.areco@mail.com.py |
I tried to perform an RLS but it does not work, please if you verify the file, you can discard the calculation
Tks!
Solved! Go to Solution.
Hi @OrlandoChd ,
I think you want dynamic RLS with manager level access, please kindly refer to
Dynamic Row Level Security with Manager Level Access in Power BI - RADACAD
And here'my solution based on the above article.
1.Create a calculated column in RLS table.
Is Admin = IF([VISTA]="ADMINISTRADOR",1,0)
2.Create a relationship between tables. Make sure select 'Apply security filter in both directions'.
3.Create a role.
If(
MaxX(
Filter(
'RLS',
'RLS'[CORREO]=Username())
,'RLS'[Is Admin])=0,
'RLS'[CORREO]=Username(),
1=1
)
Now, let's test.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @OrlandoChd ,
I think you want dynamic RLS with manager level access, please kindly refer to
Dynamic Row Level Security with Manager Level Access in Power BI - RADACAD
And here'my solution based on the above article.
1.Create a calculated column in RLS table.
Is Admin = IF([VISTA]="ADMINISTRADOR",1,0)
2.Create a relationship between tables. Make sure select 'Apply security filter in both directions'.
3.Create a role.
If(
MaxX(
Filter(
'RLS',
'RLS'[CORREO]=Username())
,'RLS'[Is Admin])=0,
'RLS'[CORREO]=Username(),
1=1
)
Now, let's test.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
98 | |
80 | |
67 | |
63 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |